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 diff -B -b $TEMPDIR/pspp.list - <<EOF
73 1.1 DATA LIST. Reading free-form data from the command file.
82 2.1 T-TEST. Paired Sample Statistics
83 #========#====#=#==============#========#
84 # #Mean|N|Std. Deviation|SE. Mean#
85 #========#====#=#==============#========#
86 #Pair 0 A#2.00|5| .707| .316#
87 # B#4.00|5| 1.541| .689#
88 #========#====#=#==============#========#
90 2.2 T-TEST. Paired Samples Correlations
91 #======#=====#=#===========#====#
92 # | #N|Correlation|Sig.#
93 #======#=====#=#===========#====#
94 #Pair 0|A & B#5| .918|.028#
95 #======#=====#=#===========#====#
97 2.3 T-TEST. Paired Samples Test
98 #===========#=====================================================#======#==#===============#
99 # # Paired Differences | | | #
100 # #-------+--------------+---------------+--------------+ | | #
101 # # | | | 95% | | | #
102 # # | | +-------+------+ | | #
103 # # Mean |Std. Deviation|Std. Error Mean| Lower | Upper| t |df|Sig. (2-tailed)#
104 #===========#=======#==============#===============#=======#======#======#==#===============#
105 #Pair 0A - B#-2.0000| .93541| .41833|-3.1615|-.8385|-4.781| 4| .009#
106 #===========#=======#==============#===============#=======#======#======#==#===============#
108 if [ $? -ne 0 ] ; then fail ; fi