+x,Assume equal variances,1,-7.40,6.67,1.11,20,.280
+,,2,6.26,12.32,.51,20,.617
+,Does not assume equal,1,-7.40,10.04,-.74,4.53,.497
+,,2,6.26,5.85,1.07,2.87,.366
+y,Assume equal variances,1,-6.88,1.16,5.94,20,.000
+,,2,3.50,2.14,1.63,20,.118
+,Does not assume equal,1,-6.88,.91,-7.51,7.00,.000
+,,2,3.50,1.32,2.65,7.00,.033
+z,Assume equal variances,1,-9.70,8.07,1.20,20,.243
+,,2,11.73,14.91,.79,20,.440
+,Does not assume equal,1,-9.70,9.57,-1.01,3.64,.373
+,,2,11.73,14.53,.81,9.88,.438
+])
+
+AT_CLEANUP
+
+
+
+dnl Tests that everything treats weights properly
+AT_SETUP([ONEWAY vs. weights])
+
+AT_DATA([oneway-unweighted.sps],
+[DATA LIST NOTABLE LIST /QUALITY * BRAND * W *.
+BEGIN DATA
+3 1 1
+2 1 1
+1 1 1
+1 1 1
+4 1 1
+5 2 1
+2 2 1
+4 2 1
+4 2 1
+4 2 1
+2 2 1
+2 2 1
+3 2 1
+7 3 1
+4 3 1
+5 3 1
+5 3 1
+3 3 1
+6 3 1
+END DATA.
+
+WEIGHT BY W.
+
+ONEWAY
+ quality BY brand
+ /STATISTICS descriptives homogeneity
+ .
+])
+
+AT_CHECK([pspp -o pspp-unweighted.csv oneway-unweighted.sps], [0], [ignore], [ignore])
+
+AT_DATA([oneway-weighted.sps],
+[DATA LIST NOTABLE LIST /QUALITY * BRAND * W *.
+BEGIN DATA
+3 1 1
+2 1 1
+1 1 2
+4 1 1
+5 2 1
+2 2 1
+4 2 3
+2 2 2
+3 2 1
+7 3 1
+4 3 1
+5 3 2
+3 3 1
+6 3 1
+END DATA.
+
+WEIGHT BY W.
+
+ONEWAY
+ quality BY brand
+ /STATISTICS descriptives homogeneity
+ .
+])
+
+AT_CHECK([pspp -o pspp-weighted.csv oneway-weighted.sps], [0], [ignore], [ignore])
+
+AT_CHECK([diff pspp-weighted.csv pspp-unweighted.csv], [0])
+
+AT_CLEANUP
+
+
+
+AT_SETUP([ONEWAY posthoc LSD and BONFERRONI])
+AT_DATA([oneway-pig.sps],[dnl
+SET FORMAT F12.3.
+data list notable list /pigmentation * family *.
+begin data.
+36 1
+39 1
+43 1
+38 1
+37 1
+46 2
+47 2
+47 2
+47 2
+43 2
+40 3
+50 3
+44 3
+48 3
+50 3
+45 4
+53 4
+56 4
+52 4
+56 4
+end data.
+
+
+oneway pigmentation by family
+ /statistics = descriptives
+ /posthoc = lsd bonferroni alpha (0.05)
+ .
+])
+
+AT_CHECK([pspp -O format=csv oneway-pig.sps], [0],
+[Table: Descriptives
+,,,,,,95% Confidence Interval for Mean,,,
+,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum
+pigmentation,1.000,5,38.600,2.702,1.208,35.245,41.955,36.000,43.000
+,2.000,5,46.000,1.732,.775,43.849,48.151,43.000,47.000
+,3.000,5,46.400,4.336,1.939,41.016,51.784,40.000,50.000
+,4.000,5,52.400,4.506,2.015,46.806,57.994,45.000,56.000
+,Total,20,45.850,5.967,1.334,43.057,48.643,36.000,56.000
+
+Table: ANOVA
+,,Sum of Squares,df,Mean Square,F,Sig.
+pigmentation,Between Groups,478.950,3,159.650,12.927,.000
+,Within Groups,197.600,16,12.350,,
+,Total,676.550,19,,,
+
+Table: Multiple Comparisons (pigmentation)
+,,,Mean Difference,,,95% Confidence Interval,
+,(I) family,(J) family,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound
+LSD,1.000,2.000,-7.400,2.223,.004,-12.112,-2.688
+,,3.000,-7.800,2.223,.003,-12.512,-3.088
+,,4.000,-13.800,2.223,.000,-18.512,-9.088
+,2.000,1.000,7.400,2.223,.004,2.688,12.112
+,,3.000,-.400,2.223,.859,-5.112,4.312
+,,4.000,-6.400,2.223,.011,-11.112,-1.688
+,3.000,1.000,7.800,2.223,.003,3.088,12.512
+,,2.000,.400,2.223,.859,-4.312,5.112
+,,4.000,-6.000,2.223,.016,-10.712,-1.288
+,4.000,1.000,13.800,2.223,.000,9.088,18.512
+,,2.000,6.400,2.223,.011,1.688,11.112
+,,3.000,6.000,2.223,.016,1.288,10.712
+Bonferroni,1.000,2.000,-7.400,2.223,.025,-14.086,-.714
+,,3.000,-7.800,2.223,.017,-14.486,-1.114
+,,4.000,-13.800,2.223,.000,-20.486,-7.114
+,2.000,1.000,7.400,2.223,.025,.714,14.086
+,,3.000,-.400,2.223,1.000,-7.086,6.286
+,,4.000,-6.400,2.223,.065,-13.086,.286
+,3.000,1.000,7.800,2.223,.017,1.114,14.486
+,,2.000,.400,2.223,1.000,-6.286,7.086
+,,4.000,-6.000,2.223,.095,-12.686,.686
+,4.000,1.000,13.800,2.223,.000,7.114,20.486
+,,2.000,6.400,2.223,.065,-.286,13.086
+,,3.000,6.000,2.223,.095,-.686,12.686
+])
+
+AT_CLEANUP
+
+
+AT_SETUP([ONEWAY posthoc Tukey HSD and Games-Howell])
+AT_DATA([oneway-tukey.sps],[dnl
+set format = f11.3.
+data list notable list /libido * dose *.
+begin data.
+3 0
+2 0
+1 0
+1 0
+4 0
+5 1
+2 1
+4 1
+2 1
+3 1
+7 2
+4 2
+5 2
+3 2
+6 2
+end data.
+
+variable label dose 'Dose of Viagra'.
+
+add value labels dose 0 'Placebo' 1 '1 Dose' 2 '2 Doses'.
+
+oneway libido by dose
+ /posthoc tukey gh.
+])
+
+AT_CHECK([pspp -O format=csv oneway-tukey.sps], [0],
+[Table: ANOVA
+,,Sum of Squares,df,Mean Square,F,Sig.
+libido,Between Groups,20.133,2,10.067,5.119,.025
+,Within Groups,23.600,12,1.967,,
+,Total,43.733,14,,,
+
+Table: Multiple Comparisons (libido)
+,,,Mean Difference,,,95% Confidence Interval,
+,(I) Dose of Viagra,(J) Dose of Viagra,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound
+Tukey HSD,Placebo,1 Dose,-1.000,.887,.516,-3.366,1.366
+,,2 Doses,-2.800,.887,.021,-5.166,-.434
+,1 Dose,Placebo,1.000,.887,.516,-1.366,3.366
+,,2 Doses,-1.800,.887,.147,-4.166,.566
+,2 Doses,Placebo,2.800,.887,.021,.434,5.166
+,,1 Dose,1.800,.887,.147,-.566,4.166
+Games-Howell,Placebo,1 Dose,-1.000,.887,.479,-3.356,1.356
+,,2 Doses,-2.800,.887,.039,-5.439,-.161
+,1 Dose,Placebo,1.000,.887,.479,-1.356,3.356
+,,2 Doses,-1.800,.887,.185,-4.439,.839
+,2 Doses,Placebo,2.800,.887,.039,.161,5.439
+,,1 Dose,1.800,.887,.185,-.839,4.439