3 # This program tests that the T-TEST /GROUPS command works
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
8 # ensure that top_builddir are absolute
9 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
10 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
11 top_builddir=`cd $top_builddir; pwd`
12 PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT
14 # ensure that top_srcdir is absolute
15 top_srcdir=`cd $top_srcdir; pwd`
17 STAT_CONFIG_PATH=$top_srcdir/config
18 export STAT_CONFIG_PATH
23 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
24 echo "NOT cleaning $TEMPDIR"
59 activity="create program"
61 data list list /ID * INDEP * DEP1 * DEP2 *.
76 * Note that this last case should be IGNORED since it doesn't have a dependent variable of either 1 or 2
78 t-test /GROUPS=indep(1.1,2.1) /var=dep1 dep2.
80 if [ $? -ne 0 ] ; then no_result ; fi
83 activity="run program"
84 $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
85 if [ $? -ne 0 ] ; then no_result ; fi
87 activity="compare output"
88 diff -c $TEMPDIR/pspp.csv - <<EOF
89 Table: Reading free-form data from INLINE.
96 Table: Group Statistics
97 ,INDEP,N,Mean,Std. Deviation,S.E. Mean
98 DEP1,1.1,5,2.00,.71,.32
100 DEP2,1.1,5,4.00,.71,.32
103 Table: Independent Samples Test
104 ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
105 ,,,,,,,,,95% Confidence Interval of the Difference,
106 ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
107 DEP1,Equal variances assumed,.00,1.00,-4.47,8.00,.00,-2.00,.45,-3.03,-.97
108 ,Equal variances not assumed,,,-4.47,8.00,.00,-2.00,.45,-3.03,-.97
109 DEP2,Equal variances assumed,.00,1.00,4.47,8.00,.00,2.00,.45,.97,3.03
110 ,Equal variances not assumed,,,4.47,8.00,.00,2.00,.45,.97,3.03
112 if [ $? -ne 0 ] ; then fail ; fi