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