private void toolStripMenuItemStatsElementsConstructs_Click(object sender, EventArgs e) { try { dlgValues dlg = new dlgValues(); dlg.Text = "Please provide custom parameters for the statsConstructs function"; dlg.AcceptedValues = InterviewService.StatsGridAcceptedValues(); if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) { throw new Exception("Aborted by User"); } RDotNet.DataFrame df = this.interviewService.StatsGrid(false, dlg.OptionalValues); RHelper.RHelper.FillDataGridViewFromR(df, getDGV(getNewTabpage("statsConstructs")), 3); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error while Calculating statistics for Constructs"); } }
private void bertinClusterToolStripMenuItem_Click(object sender, EventArgs e) { try { dlgValues dlg = new dlgValues(); dlg.Text = "Please provide custom parameters for the BertinCluster function"; dlg.AcceptedValues = InterviewService.BertinClusterAcceptedValues(); if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) { throw new Exception("Aborted by User"); } this.interviewService.BertinCluster(dlg.OptionalValues); } catch (Exception ex) { Console.WriteLine(ex.ToString()); Console.WriteLine(ex.StackTrace); MessageBox.Show(ex.Message, "Error while Bertin-Clustering"); } }
private void principalComponentAnalysisPCAToolStripMenuItem_Click(object sender, EventArgs e) { try { dlgValues dlg = new dlgValues(); dlg.Text = "Please provide custom parameters for the constructPca function"; dlg.AcceptedValues = InterviewService.PCAAcceptedValues(); if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) { throw new Exception("Aborted by User"); } this.interviewService.ConstructPCA(dlg.OptionalValues); MessageBox.Show("Please Check the R-Output in the Console for the results!", "Principal component analysis (PCA) of inter-construct correlations"); } catch (Exception ex) { Console.WriteLine(ex.ToString()); Console.WriteLine(ex.StackTrace); MessageBox.Show(ex.Message, "Error during the Principal component analysis (PCA)"); } }
private void constructCorToolStripMenuItem_Click(object sender, EventArgs e) { try { dlgValues dlg = new dlgValues(); dlg.Text = "Please provide custom parameters for the constructCor function"; dlg.AcceptedValues = InterviewService.CorrelationAcceptedValues(); if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) { throw new Exception("Aborted by User"); } RDotNet.NumericMatrix df = this.interviewService.Correlation(false, dlg.OptionalValues); RHelper.RHelper.FillDataGridViewFromR(df, getDGV(getNewTabpage("constructCor")), 3); } catch (Exception ex) { Console.WriteLine(ex.ToString()); Console.WriteLine(ex.StackTrace); MessageBox.Show(ex.Message, "Error while Calculating Correlations for Constructs"); } }
private void slaterDistances1977ToolStripMenuItem_Click(object sender, EventArgs e) { try { dlgValues dlg = new dlgValues(); dlg.Text = "Please provide custom parameters for the Slater-distance function"; dlg.AcceptedValues = InterviewService.DistanceSlaterAcceptedValues(); if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) { throw new Exception("Aborted by User"); } RDotNet.NumericMatrix nm = this.Service.DistanceSlater(dlg.OptionalValues); DataGridView dgv = getDGV(getNewTabpage("distanceSlater")); RHelper.RHelper.FillDataGridViewFromR(nm, dgv, 3); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error while Calculating Slater-1977-Distances between Elements"); } }
private void heckmannsApproach2012ToolStripMenuItem_Click(object sender, EventArgs e) { try { dlgValues dlg = new dlgValues(); dlg.Text = "Please provide custom parameters for the Heckmann-distance function (prob, progress, distribution not implemented here)"; dlg.AcceptedValues = InterviewService.DistanceNormalizedAcceptedValues(); if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) { throw new Exception("Aborted by User"); } RDotNet.NumericMatrix df = this.interviewService.DistanceHartmann(dlg.OptionalValues); RHelper.RHelper.FillDataGridViewFromR(df, getDGV(getNewTabpage("distanceNormalized")), 3); } catch (Exception ex) { Console.WriteLine(ex.ToString()); Console.WriteLine(ex.StackTrace); MessageBox.Show(ex.Message, "Error while Calculating Heckmann-Distances between Elements"); } }