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 export STAT_CONFIG_PATH=$top_srcdir/config
49 activity="create program"
51 data list list /ID * A * B *.
60 t-test /PAIRS a with b (PAIRED).
62 if [ $? -ne 0 ] ; then no_result ; fi
65 activity="run program"
66 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
67 if [ $? -ne 0 ] ; then no_result ; fi
69 activity="compare output"
70 diff -B -b $TEMPDIR/pspp.list - <<EOF
71 1.1 DATA LIST. Reading free-form data from the command file.
80 2.1 T-TEST. Paired Sample Statistics
81 #========#====#=#==============#========#
82 # #Mean|N|Std. Deviation|SE. Mean#
83 #========#====#=#==============#========#
84 #Pair 0 A#2.00|5| .707| .316#
85 # B#4.00|5| 1.541| .689#
86 #========#====#=#==============#========#
88 2.2 T-TEST. Paired Samples Correlations
89 #======#=====#=#===========#====#
90 # | #N|Correlation|Sig.#
91 #======#=====#=#===========#====#
92 #Pair 0|A & B#5| .918|.028#
93 #======#=====#=#===========#====#
95 2.3 T-TEST. Paired Samples Test
96 #===========#=====================================================#======#==#===============#
97 # # Paired Differences | | | #
98 # #-------+--------------+---------------+--------------+ | | #
100 # # | | +-------+------+ | | #
101 # # Mean |Std. Deviation|Std. Error Mean| Lower | Upper| t |df|Sig. (2-tailed)#
102 #===========#=======#==============#===============#=======#======#======#==#===============#
103 #Pair 0A - B#-2.0000| .93541| .41833|-3.1615|-.8385|-4.781| 4| .009#
104 #===========#=======#==============#===============#=======#======#======#==#===============#
106 if [ $? -ne 0 ] ; then fail ; fi