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
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 --testing-mode $TESTFILE
94 if [ $? -ne 0 ] ; then no_result ; fi
97 activity="compare output"
98 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
99 diff -b $TEMPDIR/pspp.list - <<EOF
100 1.1 DATA LIST. Reading free-form data from INLINE.
107 2.1 T-TEST. Group Statistics
108 #===========#==#====#==============#=========#
109 # INDEP | N|Mean|Std. Deviation|S.E. Mean#
110 #===========#==#====#==============#=========#
111 #DEP >=1.514|11|9.00| 3.82| 1.15#
112 # <1.514 |11|8.00| 2.86| .86#
113 #===========#==#====#==============#=========#
114 2.2 T-TEST. Independent Samples Test
115 #==============================#========#============================================================================#
116 # #Levene's| t-test for Equality of Means #
117 # #---+----+----+-----+---------------+---------------+---------------------+-----------#
118 # # | | | | | | | 95% #
119 # # | | | | | | +-----+-----#
120 # # F |Sig.| t | df |Sig. (2-tailed)|Mean Difference|Std. Error Difference|Lower|Upper#
121 #==============================#===#====#====#=====#===============#===============#=====================#=====#=====#
122 #DEPEqual variances assumed #.17| .68|-.69|20.00| .50| -1.00| 1.44|-4.00| 2.00#
123 # Equal variances not assumed# | |-.69|18.54| .50| -1.00| 1.44|-4.02| 2.02#
124 #==============================#===#====#====#=====#===============#===============#=====================#=====#=====#
126 if [ $? -ne 0 ] ; then fail ; fi