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