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