3 # This program tests that the T-TEST /GROUPS command works
5 TEMPDIR=/tmp/pspp-tst-$$
9 # ensure that top_srcdir is absolute
10 cd $top_srcdir; top_srcdir=`pwd`
12 export STAT_CONFIG_PATH=$top_srcdir/config
48 activity="create program"
49 cat > $TEMPDIR/out.stat <<EOF
50 data list list /id * indep * dep1 * dep2 *.
64 t-test /GROUPS=indep(1,2) /var=dep1 dep2.
66 if [ $? -ne 0 ] ; then no_result ; fi
69 activity="run program"
70 $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
71 if [ $? -ne 0 ] ; then no_result ; fi
73 activity="compare output"
74 diff -B -b $TEMPDIR/pspp.list - <<EOF
75 1.1 DATA LIST. Reading free-form data from the command file.
85 2.1 T-TEST. Group Statistics
86 #==========#=#====#==============#========#
87 # INDEP|N|Mean|Std. Deviation|SE. Mean#
88 #==========#=#====#==============#========#
89 #DEP1 1 |5|2.00| .707| .316#
90 # 2 |5|4.00| .707| .316#
91 #DEP2 1 |5|4.00| .707| .316#
92 # 2 |5|2.00| .707| .316#
93 #==========#=#====#==============#========#
95 2.2 T-TEST. Independent Samples Test
96 #===============================#==========#===============================================================================#
97 # # Levene's | t-test for Equality of Means #
98 # #----+-----+------+-----+---------------+---------------+---------------------+------------#
99 # # | | | | | | | 95% #
100 # # | | | | | | +------+-----#
101 # # F | Sig.| t | df |Sig. (2-tailed)|Mean Difference|Std. Error Difference| Lower|Upper#
102 #===============================#====#=====#======#=====#===============#===============#=====================#======#=====#
103 #DEP1Equal variances assumed #.000|1.000|-4.472| 8| .002| -2.000| .447|-3.031|-.969#
104 # Equal variances not assumed# | |-4.472|8.000| .002| -2.000| .447|-3.031|-.969#
105 #DEP2Equal variances assumed #.000|1.000| 4.472| 8| .002| 2.000| .447| .969|3.031#
106 # Equal variances not assumed# | | 4.472|8.000| .002| 2.000| .447| .969|3.031#
107 #===============================#====#=====#======#=====#===============#===============#=====================#======#=====#
109 if [ $? -ne 0 ] ; then fail ; fi