3 # This program tests the EXAMINE command.
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 /quality * w * brand * .
72 VARIABLE LABELS brand 'Manufacturer'.
73 VARIABLE LABELS quality 'Breaking Strain'.
75 VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'.
77 LIST /FORMAT=NUMBERED.
81 /STATISTICS descriptives extreme(3)
84 if [ $? -ne 0 ] ; then no_result ; fi
87 activity="run program"
88 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
89 if [ $? -ne 0 ] ; then no_result ; fi
91 # NOTE: In the following data: Only the extreme values have been checked
92 # The descriptives have been blindly pasted.
93 activity="compare results"
94 diff $TEMPDIR/pspp.list - << EOF
95 1.1 DATA LIST. Reading free-form data from the command file.
104 Case# QUALITY W BRAND
105 ----- -------- -------- --------
123 2.1 EXAMINE. Case Processing Summary
124 #===============#===============================#
126 # #----------+---------+----------#
127 # # Valid | Missing | Total #
128 # #--+-------+-+-------+--+-------#
129 # # N|Percent|N|Percent| N|Percent#
130 #===============#==#=======#=#=======#==#=======#
131 #Breaking Strain#24| 100%|0| 0%|24| 100%#
132 #===============#==#=======#=#=======#==#=======#
134 2.2 EXAMINE. Extreme Values
135 #=======================#===========#=====#
136 # #Case Number|Value#
137 #=======================#===========#=====#
138 #Breaking StrainHighest1# 12| 7.00#
141 # --------#-----------+-----#
145 #=======================#===========#=====#
147 2.3 EXAMINE. Descriptives
148 #==========================================================#=========#==========#
149 # #Statistic|Std. Error#
150 #==========================================================#=========#==========#
151 #Breaking StrainMean # 3.54 | .324 #
152 # 95% Confidence Interval for MeanLower Bound# 3.562 | #
153 # Upper Bound# 3.521 | #
154 # 5% Trimmed Mean # 3.50 | #
156 # Variance # 2.520 | #
157 # Std. Deviation # 1.587 | #
158 # Minimum # 1.000 | #
159 # Maximum # 7.000 | #
161 # Interquartile Range # | #
164 #==========================================================#=========#==========#
166 2.4 EXAMINE. Case Processing Summary
167 #===========================#=============================#
169 # #---------+---------+---------#
170 # # Valid | Missing | Total #
171 # #-+-------+-+-------+-+-------#
172 # Manufacturer#N|Percent|N|Percent|N|Percent#
173 #===========================#=#=======#=#=======#=#=======#
174 #Breaking StrainAspeger #8| 100%|0| 0%|8| 100%#
175 # Bloggs #8| 100%|0| 0%|8| 100%#
176 # Charlies #8| 100%|0| 0%|8| 100%#
177 #===========================#=#=======#=#=======#=#=======#
179 2.5 EXAMINE. Extreme Values
180 #===================================#===========#=====#
181 # Manufacturer #Case Number|Value#
182 #===================================#===========#=====#
183 #Breaking StrainAspeger Highest1# 6| 4.00#
186 # --------#-----------+-----#
190 # --------------------#-----------+-----#
191 # Bloggs Highest1# 7| 5.00#
194 # --------#-----------+-----#
198 # --------------------#-----------+-----#
199 # Charlies Highest1# 12| 7.00#
202 # --------#-----------+-----#
206 #===================================#===========#=====#
208 2.6 EXAMINE. Descriptives
209 #======================================================================#=========#==========#
210 # Manufacturer #Statistic|Std. Error#
211 #======================================================================#=========#==========#
212 #Breaking StrainAspeger Mean # 2.25 | .453 #
213 # 95% Confidence Interval for MeanLower Bound# 2.279 | #
214 # Upper Bound# 2.221 | #
215 # 5% Trimmed Mean # 2.22 | #
217 # Variance # 1.643 | #
218 # Std. Deviation # 1.282 | #
219 # Minimum # 1.000 | #
220 # Maximum # 4.000 | #
222 # Interquartile Range # | #
225 # -------------------------------------------------------#---------+----------#
226 # Bloggs Mean # 3.50 | .378 #
227 # 95% Confidence Interval for MeanLower Bound# 3.525 | #
228 # Upper Bound# 3.475 | #
229 # 5% Trimmed Mean # 3.50 | #
231 # Variance # 1.143 | #
232 # Std. Deviation # 1.069 | #
233 # Minimum # 2.000 | #
234 # Maximum # 5.000 | #
236 # Interquartile Range # | #
239 # -------------------------------------------------------#---------+----------#
240 # Charlies Mean # 4.88 | .441 #
241 # 95% Confidence Interval for MeanLower Bound# 4.904 | #
242 # Upper Bound# 4.846 | #
243 # 5% Trimmed Mean # 4.86 | #
245 # Variance # 1.554 | #
246 # Std. Deviation # 1.246 | #
247 # Minimum # 3.000 | #
248 # Maximum # 7.000 | #
250 # Interquartile Range # | #
253 #======================================================================#=========#==========#
256 if [ $? -ne 0 ] ; then fail ; fi