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
11 # ensure that top_srcdir is absolute
12 cd $top_srcdir; top_srcdir=`pwd`
14 STAT_CONFIG_PATH=$top_srcdir/config
15 export STAT_CONFIG_PATH
52 activity="create program"
54 data list list /INDEP * DEP *.
79 t-test /groups=indep(1.514) /var=dep.
81 if [ $? -ne 0 ] ; then no_result ; fi
84 activity="run program"
85 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
86 if [ $? -ne 0 ] ; then no_result ; fi
89 activity="compare output"
90 diff -B -b $TEMPDIR/pspp.list - <<EOF
91 1.1 DATA LIST. Reading free-form data from the command file.
99 2.1 T-TEST. Group Statistics
100 #===========#==#====#==============#========#
101 # INDEP | N|Mean|Std. Deviation|SE. Mean#
102 #===========#==#====#==============#========#
103 #DEP < 1.514|11|8.00| 2.864| .863#
104 # >=1.514|11|9.00| 3.821| 1.152#
105 #===========#==#====#==============#========#
107 2.2 T-TEST. Independent Samples Test
108 #==============================#=========#===============================================================================#
109 # #Levene's | t-test for Equality of Means #
110 # #----+----+-----+------+---------------+---------------+---------------------+------------#
111 # # | | | | | | | 95% #
112 # # | | | | | | +------+-----#
113 # # F |Sig.| t | df |Sig. (2-tailed)|Mean Difference|Std. Error Difference| Lower|Upper#
114 #==============================#====#====#=====#======#===============#===============#=====================#======#=====#
115 #DEPEqual variances assumed #.172|.683|-.695| 20| .495| -1.000| 1.440|-4.003|2.003#
116 # Equal variances not assumed# | |-.695|18.539| .496| -1.000| 1.440|-4.018|2.018#
117 #==============================#====#====#=====#======#===============#===============#=====================#======#=====#
119 if [ $? -ne 0 ] ; then fail ; fi