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 *.
65 * Note that this last case should be IGNORED since it doesn't have a dependent variable of either 1 or 2
67 t-test /GROUPS=indep(1.1,2.1) /var=dep1 dep2.
69 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="run program"
73 $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="compare output"
77 diff -B -b $TEMPDIR/pspp.list - <<EOF
78 1.1 DATA LIST. Reading free-form data from the command file.
88 2.1 T-TEST. Group Statistics
89 #==========#=#====#==============#========#
90 # INDEP|N|Mean|Std. Deviation|SE. Mean#
91 #==========#=#====#==============#========#
92 #DEP1 1.1 |5|2.00| .707| .316#
93 # 2.1 |5|4.00| .707| .316#
94 #DEP2 1.1 |5|4.00| .707| .316#
95 # 2.1 |5|2.00| .707| .316#
96 #==========#=#====#==============#========#
98 2.2 T-TEST. Independent Samples Test
99 #===============================#==========#===============================================================================#
100 # # Levene's | t-test for Equality of Means #
101 # #----+-----+------+-----+---------------+---------------+---------------------+------------#
102 # # | | | | | | | 95% #
103 # # | | | | | | +------+-----#
104 # # F | Sig.| t | df |Sig. (2-tailed)|Mean Difference|Std. Error Difference| Lower|Upper#
105 #===============================#====#=====#======#=====#===============#===============#=====================#======#=====#
106 #DEP1Equal variances assumed #.000|1.000|-4.472| 8| .002| -2.000| .447|-3.031|-.969#
107 # Equal variances not assumed# | |-4.472|8.000| .002| -2.000| .447|-3.031|-.969#
108 #DEP2Equal variances assumed #.000|1.000| 4.472| 8| .002| 2.000| .447| .969|3.031#
109 # Equal variances not assumed# | | 4.472|8.000| .002| 2.000| .447| .969|3.031#
110 #===============================#====#=====#======#=====#===============#===============#=====================#======#=====#
112 if [ $? -ne 0 ] ; then fail ; fi