3 # This program tests that the T-TEST /GROUPS command works properly
4 # when a single value in the independent variable is given.
6 TEMPDIR=/tmp/pspp-tst-$$
7 TESTFILE=$TEMPDIR/`basename $0`.sps
9 # ensure that top_builddir are absolute
10 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
11 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
12 top_builddir=`cd $top_builddir; pwd`
13 PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT
15 # ensure that top_srcdir is absolute
16 top_srcdir=`cd $top_srcdir; pwd`
18 STAT_CONFIG_PATH=$top_srcdir/config
19 export STAT_CONFIG_PATH
24 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
25 echo "NOT cleaning $TEMPDIR"
60 activity="create program"
62 data list list /INDEP * DEP *.
87 t-test /groups=indep(1.514) /var=dep.
89 if [ $? -ne 0 ] ; then no_result ; fi
92 activity="run program"
93 $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
94 if [ $? -ne 0 ] ; then no_result ; fi
97 activity="compare output"
98 diff -c $TEMPDIR/pspp.csv - <<EOF
99 Table: Reading free-form data from INLINE.
104 Table: Group Statistics
105 ,INDEP,N,Mean,Std. Deviation,S.E. Mean
106 DEP,>=1.514,11,9.00,3.82,1.15
107 ,<1.514,11,8.00,2.86,.86
109 Table: Independent Samples Test
110 ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
111 ,,,,,,,,,95% Confidence Interval of the Difference,
112 ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
113 DEP,Equal variances assumed,.17,.68,-.69,20.00,.50,-1.00,1.44,-4.00,2.00
114 ,Equal variances not assumed,,,-.69,18.54,.50,-1.00,1.44,-4.02,2.02
116 if [ $? -ne 0 ] ; then fail ; fi