Changeset 9329
- Timestamp:
- 03/21/13 13:26:16 (12 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/SampleSizeDetermination.cs
r9328 r9329 49 49 /// <returns>Cohen's d. 50 50 /// d = 0.2 means small effect 51 /// d = 0.5 means averageeffect51 /// d = 0.5 means medium effect 52 52 /// d = 0.8 means big effect 53 53 /// According to Wikipedia this means: "A lower Cohen's d indicates a necessity of larger sample sizes, and vice versa." 54 54 /// </returns> 55 public static double C ohensD(double[] d1, double[] d2) {55 public static double CalculateCohensD(double[] d1, double[] d2) { 56 56 double x1, x2, s1, s2; 57 57 … … 65 65 66 66 /// <summary> 67 /// Calculates Hedges' g. 67 /// Calculates Hedges' g. 68 /// Hedges' g works like Cohen's d but corrects for bias. 68 69 /// </summary> 69 70 /// <returns>Hedges' g</returns> 70 public static double HedgesG(double[] d1, double[] d2) {71 public static double CalculateHedgesG(double[] d1, double[] d2) { 71 72 double x1, x2, s1, s2, n1, n2, s, g, c; 72 73 -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/StatisticalTestingView.cs
r9320 r9329 26 26 using System.Windows.Forms; 27 27 using HeuristicLab.Analysis.AlgorithmBehavior.Analyzers; 28 using HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views; 28 29 using HeuristicLab.Core.Views; 29 30 using HeuristicLab.Data; … … 206 207 DoubleMatrix pValsMatrix = new DoubleMatrix(1, stringConvertibleMatrixView.Content.Columns); 207 208 pValsMatrix.ColumnNames = stringConvertibleMatrixView.Content.ColumnNames; 208 pValsMatrix.RowNames = new string[] { "p-Value s" };209 pValsMatrix.RowNames = new string[] { "p-Value" }; 209 210 210 211 double val; … … 232 233 } 233 234 234 DoubleMatrix pValsMatrix = new DoubleMatrix( 1, stringConvertibleMatrixView.Content.Columns);235 DoubleMatrix pValsMatrix = new DoubleMatrix(3, stringConvertibleMatrixView.Content.Columns); 235 236 pValsMatrix.ColumnNames = stringConvertibleMatrixView.Content.ColumnNames; 236 pValsMatrix.RowNames = new string[] { "p-Value s" };237 pValsMatrix.RowNames = new string[] { "p-Value", "Cohen's d", "Hedges' g" }; 237 238 238 239 double bothtails; … … 242 243 alglib.mannwhitneyutest(data[colIndex], data[colIndex].Length, data[i], data[i].Length, out bothtails, out lefttail, out righttail); 243 244 pValsMatrix[0, i] = bothtails; 245 pValsMatrix[1, i] = SampleSizeDetermination.CalculateCohensD(data[colIndex], data[i]); 246 pValsMatrix[2, i] = SampleSizeDetermination.CalculateHedgesG(data[colIndex], data[i]); 244 247 } 245 248 -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/StatisticalTestingView.resx
r9320 r9329 166 166 lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l 167 167 f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK 168 j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALD wAACw8BkvkDpQAAABl0RVh0U29mdHdhcmUA168 j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAAABl0RVh0U29mdHdhcmUA 169 169 UGFpbnQuTkVUIHYzLjUuODc7gF0AAAK0SURBVDhPrZBrSNNRAMWNvkVEEBT0oY+BUAgSRBhIQmUqKYb4 170 170 KgudU1MTlj2WZUlMykdu+VhatmWKWaaITF35qCmzWoaGj81kms72dm5/3cM9TtvdX9Sob/0+XC6Hcw73 … … 194 194 195 195 For pairwise comparision of the groups the Mann-Whitney U test is used. 196 It also requires sample sizes of at least 5 samples.</value> 196 It also requires sample sizes of at least 5 samples. 197 198 The p-values calculated by the statistical tests are interpreted as follows: 199 The null hypothesis states that the groups which are compared have the same distribution. 200 A p-value < 0.05 (this value is often chosen as significance level) means the null hypothesis is rejected, 201 which therefore means that the distributions are not equal. 202 203 For the pariwise statistical test, in addition to the p-value, Cohen's d and Hedges' g are calculated. 204 According to Wikipedia, these values can be interpreted as follows: "A lower Cohen's d indicates a necessity of larger sample sizes, and vice versa."</value> 197 205 </data> 198 206 </root>
Note: See TracChangeset
for help on using the changeset viewer.