3 # This program tests that the T-TEST /PAIRS command works OK
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
51 activity="create program"
53 data list list /ID * A * B *.
62 t-test /PAIRS a with b (PAIRED).
64 if [ $? -ne 0 ] ; then no_result ; fi
67 activity="run program"
68 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
69 if [ $? -ne 0 ] ; then no_result ; fi
71 activity="compare output"
72 perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
73 diff -b $TEMPDIR/pspp.list - <<EOF | perl -e 's/^\s*$//g'
74 1.1 DATA LIST. Reading free-form data from the command file.
83 2.1 T-TEST. Paired Sample Statistics
84 #========#====#=#==============#========#
85 # #Mean|N|Std. Deviation|SE. Mean#
86 #========#====#=#==============#========#
87 #Pair 0 A#2.00|5| .707| .316#
88 # B#4.00|5| 1.541| .689#
89 #========#====#=#==============#========#
91 2.2 T-TEST. Paired Samples Correlations
92 #======#=====#=#===========#====#
93 # | #N|Correlation|Sig.#
94 #======#=====#=#===========#====#
95 #Pair 0|A & B#5| .918|.028#
96 #======#=====#=#===========#====#
98 2.3 T-TEST. Paired Samples Test
99 #===========#=====================================================#======#==#===============#
100 # # Paired Differences | | | #
101 # #-------+--------------+---------------+--------------+ | | #
102 # # | | | 95% | | | #
103 # # | | +-------+------+ | | #
104 # # Mean |Std. Deviation|Std. Error Mean| Lower | Upper| t |df|Sig. (2-tailed)#
105 #===========#=======#==============#===============#=======#======#======#==#===============#
106 #Pair 0A - B#-2.0000| .93541| .41833|-3.1615|-.8385|-4.781| 4| .009#
107 #===========#=======#==============#===============#=======#======#======#==#===============#
109 if [ $? -ne 0 ] ; then fail ; fi