3 # This program tests that the ONEWAY anova 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
19 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
20 echo Not cleaning $TEMPDIR;
55 activity="create program"
57 DATA LIST LIST /QUALITY * BRAND * .
76 VARIABLE LABELS brand 'Manufacturer'.
77 VARIABLE LABELS quality 'Breaking Strain'.
79 VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'.
83 /STATISTICS descriptives homogeneity
88 if [ $? -ne 0 ] ; then no_result ; fi
91 activity="run program"
92 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
93 if [ $? -ne 0 ] ; then no_result ; fi
95 perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
96 diff -b $TEMPDIR/pspp.list - << EOF | perl -e 's/^\s*$//g'
97 1.1 DATA LIST. Reading free-form data from the command file.
105 2.1 ONEWAY. Descriptives
106 #===============#========#==#====#==============#==========#=======================#=======#=======#
107 # | # | | | | 95% Confidence | | #
108 # | # | | | +-----------+-----------+ | #
109 # | # N|Mean|Std. Deviation|Std. Error|Lower Bound|Upper Bound|Minimum|Maximum#
110 #===============#========#==#====#==============#==========#===========#===========#=======#=======#
111 #Breaking Strain|Aspeger # 5|2.20| 1.30| .58| .58| 3.82| 1.00| 4.00#
112 # |Bloggs # 5|3.20| 1.30| .58| 1.58| 4.82| 2.00| 5.00#
113 # |Charlies# 5|5.00| 1.58| .71| 3.04| 6.96| 3.00| 7.00#
114 # |Total #15|3.47| 1.77| .46| 2.49| 4.45| 1.00| 7.00#
115 #===============#========#==#====#==============#==========#===========#===========#=======#=======#
117 2.2 ONEWAY. Test of Homogeneity of Variances
118 #===============#================#===#===#============#
119 # #Levene Statistic|df1|df2|Significance#
120 #===============#================#===#===#============#
121 #Breaking Strain# .092| 2| 12| .913#
122 #===============#================#===#===#============#
125 #==============================#==============#==#===========#=====#============#
126 # #Sum of Squares|df|Mean Square| F |Significance#
127 #===============#==============#==============#==#===========#=====#============#
128 #Breaking Strain|Between Groups# 20.13| 2| 10.067|5.119| .025#
129 # |Within Groups # 23.60|12| 1.967| | #
130 # |Total # 43.73|14| | | #
131 #===============#==============#==============#==#===========#=====#============#
133 2.4 ONEWAY. Contrast Coefficients
134 #==========#=======================#
136 # #-------+------+--------#
137 # #Aspeger|Bloggs|Charlies#
138 #========#=#=======#======#========#
139 #Contrast|1# -2| 1| 1#
141 #========#=#=======#======#========#
143 2.5 ONEWAY. Contrast Tests
144 #===============================================#=================#==========#=====#=====#===============#
145 # Contrast#Value of Contrast|Std. Error| t | df |Sig. (2-tailed)#
146 #===============#======================#========#=================#==========#=====#=====#===============#
147 #Breaking Strain|Assume equal variances| 1 # 3.80| 1.536|2.474| 12| .029#
148 # | | 2 # 1.80| .887|2.029| 12| .065#
149 # |Does not assume equal | 1 # 3.80| 1.483|2.562|8.740| .031#
150 # | | 2 # 1.80| .917|1.964|7.720| .086#
151 #===============#======================#========#=================#==========#=====#=====#===============#
154 if [ $? -ne 0 ] ; then fail ; fi