T-TEST: Fixed a bug in reporting the independent samples std err of the difference
[pspp] / tests / language / stats / t-test.at
index ceda4c28a1988fc201eac27ffbeab2f15ec6d08f..de551607f8b48987ca0ae83757227256ceb4d4ca 100644 (file)
@@ -23,18 +23,18 @@ B,F8.0
 
 Table: Paired Sample Statistics
 ,,Mean,N,Std. Deviation,S.E. Mean
-Pair 0,A,2.00,5,.71,.32
+Pair 1,A,2.00,5,.71,.32
 ,B,4.00,5,1.54,.69
 
 Table: Paired Samples Correlations
 ,,N,Correlation,Sig.
-Pair 0,A & B,5,.92,.03
+Pair 1,A & B,5,.92,.03
 
 Table: Paired Samples Test
 ,,Paired Differences,,,,,,,
 ,,,,,95% Confidence Interval of the Difference,,,,
 ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
-Pair 0,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.01
+Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.01
 ])
 AT_CLEANUP
 
@@ -62,22 +62,22 @@ d,F8.0
 
 Table: Paired Sample Statistics
 ,,Mean,N,Std. Deviation,S.E. Mean
-Pair 0,a,2.00,5,.71,.32
+Pair 1,a,2.00,5,.71,.32
 ,b,4.00,5,1.54,.69
-Pair 1,c,5.10,5,.69,.31
+Pair 2,c,5.10,5,.69,.31
 ,d,3.80,5,.16,.07
 
 Table: Paired Samples Correlations
 ,,N,Correlation,Sig.
-Pair 0,a & b,5,.92,.03
-Pair 1,c & d,5,-.92,.03
+Pair 1,a & b,5,.92,.03
+Pair 2,c & d,5,-.92,.03
 
 Table: Paired Samples Test
 ,,Paired Differences,,,,,,,
 ,,,,,95% Confidence Interval of the Difference,,,,
 ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
-Pair 0,a - b,-2.00,.94,.42,-3.16,-.84,-4.78,4,.01
-Pair 1,c - d,1.30,.84,.37,.26,2.34,3.47,4,.03
+Pair 1,a - b,-2.00,.94,.42,-3.16,-.84,-4.78,4,.01
+Pair 2,c - d,1.30,.84,.37,.26,2.34,3.47,4,.03
 ])
 AT_CHECK([pspp -o ref.csv ref.sps])
 AT_CHECK([cat ref.csv], [0], [expout])
@@ -123,22 +123,22 @@ d,F8.0
 
 Table: Paired Sample Statistics
 ,,Mean,N,Std. Deviation,S.E. Mean
-Pair 0,a,2.00,5,.71,.32
+Pair 1,a,2.00,5,.71,.32
 ,c,5.10,5,.69,.31
-Pair 1,b,4.00,5,1.54,.69
+Pair 2,b,4.00,5,1.54,.69
 ,d,3.80,5,.16,.07
 
 Table: Paired Samples Correlations
 ,,N,Correlation,Sig.
-Pair 0,a & c,5,.41,.49
-Pair 1,b & d,5,-.87,.05
+Pair 1,a & c,5,.41,.49
+Pair 2,b & d,5,-.87,.05
 
 Table: Paired Samples Test
 ,,Paired Differences,,,,,,,
 ,,,,,95% Confidence Interval of the Difference,,,,
 ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
-Pair 0,a - c,-3.10,.76,.34,-4.04,-2.16,-9.14,4,.00
-Pair 1,b - d,.20,1.68,.75,-1.89,2.29,.27,4,.80
+Pair 1,a - c,-3.10,.76,.34,-4.04,-2.16,-9.14,4,.00
+Pair 2,b - d,.20,1.68,.75,-1.89,2.29,.27,4,.80
 ])
 AT_CHECK([pspp -o ref.csv ref.sps])
 AT_CHECK([cat ref.csv], [0], [expout])
@@ -183,18 +183,18 @@ B,F8.0
 
 Table: Paired Sample Statistics
 ,,Mean,N,Std. Deviation,S.E. Mean
-Pair 0,A,4.333,3,5.774,3.333
+Pair 1,A,4.333,3,5.774,3.333
 ,B,1.333,3,.577,.333
 
 Table: Paired Samples Correlations
 ,,N,Correlation,Sig.
-Pair 0,A & B,3,1.000,.000
+Pair 1,A & B,3,1.000,.000
 
 Table: Paired Samples Test
 ,,Paired Differences,,,,,,,
 ,,,,,95% Confidence Interval of the Difference,,,,
 ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
-Pair 0,A - B,3.000,5.196,3.000,-9.908,15.908,1.000,2,.423
+Pair 1,A - B,3.000,5.196,3.000,-9.908,15.908,1.000,2,.423
 ])
 AT_CLEANUP
 
@@ -329,9 +329,9 @@ Table: Independent Samples Test
 ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
 ,,,,,,,,,95% Confidence Interval of the Difference,
 ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
-dep1,Equal variances assumed,3.75,.15,-1.12,3.00,.35,-.75,.56,-2.53,1.03
+dep1,Equal variances assumed,3.75,.15,-1.12,3.00,.35,-.75,.67,-2.89,1.39
 ,Equal variances not assumed,,,-1.34,2.78,.28,-.75,.56,-2.61,1.11
-dep2,Equal variances assumed,.60,.50,2.85,3.00,.07,3.00,1.15,-.67,6.67
+dep2,Equal variances assumed,.60,.50,2.85,3.00,.07,3.00,1.05,-.35,6.35
 ,Equal variances not assumed,,,2.60,1.68,.14,3.00,1.15,-2.98,8.98
 ])
 AT_CHECK([pspp -o ref.csv ref.sps])
@@ -626,9 +626,9 @@ T-TEST /testval=2.0 .
 T-TEST /groups=id(3) .
 ])
 AT_CHECK([pspp -O format=csv t-test.sps], [1], [dnl
-t-test.sps:11: error: T-TEST: One or more VARIABLES must be specified.
+t-test.sps:11: error: T-TEST: Required subcommand VARIABLES was not specified.
 
-t-test.sps:12: error: T-TEST: One or more VARIABLES must be specified.
+t-test.sps:12: error: T-TEST: Required subcommand VARIABLES was not specified.
 ])
 AT_CLEANUP
 
@@ -739,8 +739,28 @@ Table: Independent Samples Test
 ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
 ,,,,,,,,,95% Confidence Interval of the Difference,
 ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
-x,Equal variances assumed,1.13,.33,-2.32,6.00,.06,-.90,.38,-1.83,.03
+x,Equal variances assumed,1.13,.33,-2.32,6.00,.06,-.90,.39,-1.85,.05
 ,Equal variances not assumed,,,-2.38,4.70,.07,-.90,.38,-1.89,.09
 ])
 AT_CLEANUP
 
+
+
+dnl Tests for a bug assert failed when the group variables were not of either class
+AT_SETUP([T-TEST wrong group])
+AT_DATA([t-test-crs.sps], [dnl
+data list list /x * g *.
+begin data.
+1 2
+2 2
+3 2
+4 2
+5 2 
+end data.
+
+t-test /variables = x group=g(1,3).
+])
+
+AT_CHECK([pspp t-test-crs.sps], [0],[ignore], [ignore])
+
+AT_CLEANUP