3 # This program tests that the T-TEST /GROUPS command works
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
10 # ensure that top_srcdir is absolute
11 cd $top_srcdir; top_srcdir=`pwd`
13 STAT_CONFIG_PATH=$top_srcdir/config
14 export STAT_CONFIG_PATH
50 activity="create program"
52 data list list /ID * INDEP * DEP1 * DEP2 *.
67 * Note that this last case should be IGNORED since it doesn't have a dependent variable of either 1 or 2
69 t-test /GROUPS=indep(1.1,2.1) /var=dep1 dep2.
71 if [ $? -ne 0 ] ; then no_result ; fi
74 activity="run program"
75 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
76 if [ $? -ne 0 ] ; then no_result ; fi
78 activity="compare output"
79 diff -B -b $TEMPDIR/pspp.list - <<EOF
80 1.1 DATA LIST. Reading free-form data from the command file.
90 2.1 T-TEST. Group Statistics
91 #==========#=#====#==============#========#
92 # INDEP|N|Mean|Std. Deviation|SE. Mean#
93 #==========#=#====#==============#========#
94 #DEP1 1.1 |5|2.00| .707| .316#
95 # 2.1 |5|4.00| .707| .316#
96 #DEP2 1.1 |5|4.00| .707| .316#
97 # 2.1 |5|2.00| .707| .316#
98 #==========#=#====#==============#========#
100 2.2 T-TEST. Independent Samples Test
101 #===============================#==========#===============================================================================#
102 # # Levene's | t-test for Equality of Means #
103 # #----+-----+------+-----+---------------+---------------+---------------------+------------#
104 # # | | | | | | | 95% #
105 # # | | | | | | +------+-----#
106 # # F | Sig.| t | df |Sig. (2-tailed)|Mean Difference|Std. Error Difference| Lower|Upper#
107 #===============================#====#=====#======#=====#===============#===============#=====================#======#=====#
108 #DEP1Equal variances assumed #.000|1.000|-4.472| 8| .002| -2.000| .447|-3.031|-.969#
109 # Equal variances not assumed# | |-4.472|8.000| .002| -2.000| .447|-3.031|-.969#
110 #DEP2Equal variances assumed #.000|1.000| 4.472| 8| .002| 2.000| .447| .969|3.031#
111 # Equal variances not assumed# | | 4.472|8.000| .002| 2.000| .447| .969|3.031#
112 #===============================#====#=====#======#=====#===============#===============#=====================#======#=====#
114 if [ $? -ne 0 ] ; then fail ; fi