3 # This program tests the EXAMINE command.
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
8 # ensure that top_builddir are absolute
9 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
10 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
11 top_builddir=`cd $top_builddir; pwd`
12 PSPP=$top_builddir/src/ui/terminal/pspp
14 # ensure that top_srcdir is absolute
15 top_srcdir=`cd $top_srcdir; pwd`
17 STAT_CONFIG_PATH=$top_srcdir/config
18 export STAT_CONFIG_PATH
57 activity="create program"
59 DATA LIST LIST /QUALITY * W * BRAND * .
81 VARIABLE LABELS brand 'Manufacturer'.
82 VARIABLE LABELS quality 'Breaking Strain'.
84 VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'.
86 LIST /FORMAT=NUMBERED.
90 /STATISTICS descriptives extreme(3)
93 if [ $? -ne 0 ] ; then no_result ; fi
96 activity="run program"
97 $SUPERVISOR $PSPP -o raw-ascii $TESTFILE
98 if [ $? -ne 0 ] ; then no_result ; fi
100 # NOTE: In the following data: Only the extreme values have been checked
101 # The descriptives have been blindly pasted.
102 activity="compare results"
103 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
104 diff -b $TEMPDIR/pspp.list - << EOF
105 1.1 DATA LIST. Reading free-form data from INLINE.
113 Case# QUALITY W BRAND
114 ----- -------- -------- --------
131 2.1 EXAMINE. Case Processing Summary
132 #===============#===============================#
134 # #----------+---------+----------#
135 # # Valid | Missing | Total #
136 # #--+-------+-+-------+--+-------#
137 # # N|Percent|N|Percent| N|Percent#
138 #===============#==#=======#=#=======#==#=======#
139 #Breaking Strain#24| 100%|0| 0%|24| 100%#
140 #===============#==#=======#=#=======#==#=======#
141 2.2 EXAMINE. Extreme Values
142 #=========================#===========#=====#
143 # #Case Number|Value#
144 #=========================#===========#=====#
145 #Breaking Strain Highest 1# 12| 7.00#
148 # ----------#-----------+-----#
152 #=========================#===========#=====#
153 2.3 EXAMINE. Descriptives
154 #============================================================#=========#==========#
155 # #Statistic|Std. Error#
156 #============================================================#=========#==========#
157 #Breaking Strain Mean # 3.54 | .324 #
158 # 95% Confidence Interval for Mean Lower Bound# 2.871 | #
159 # Upper Bound# 4.212 | #
160 # 5% Trimmed Mean # 3.50 | #
162 # Variance # 2.520 | #
163 # Std. Deviation # 1.587 | #
164 # Minimum # 1.000 | #
165 # Maximum # 7.000 | #
167 # Interquartile Range # 2.75 | #
168 # Skewness # .059 | .472 #
169 # Kurtosis # -.358 | .918 #
170 #============================================================#=========#==========#
171 2.4 EXAMINE. Case Processing Summary
172 #============================#=============================#
174 # #---------+---------+---------#
175 # # Valid | Missing | Total #
176 # #-+-------+-+-------+-+-------#
177 # Manufacturer#N|Percent|N|Percent|N|Percent#
178 #============================#=#=======#=#=======#=#=======#
179 #Breaking Strain Aspeger #8| 100%|0| 0%|8| 100%#
180 # Bloggs #8| 100%|0| 0%|8| 100%#
181 # Charlies #8| 100%|0| 0%|8| 100%#
182 #============================#=#=======#=#=======#=#=======#
183 2.5 EXAMINE. Extreme Values
184 #======================================#===========#=====#
185 # Manufacturer #Case Number|Value#
186 #======================================#===========#=====#
187 #Breaking Strain Aspeger Highest 1# 6| 4.00#
190 # ----------#-----------+-----#
194 # -----------------------#-----------+-----#
195 # Bloggs Highest 1# 7| 5.00#
198 # ----------#-----------+-----#
199 # Lowest 1# 10| 2.00#
202 # -----------------------#-----------+-----#
203 # Charlies Highest 1# 12| 7.00#
206 # ----------#-----------+-----#
207 # Lowest 1# 15| 3.00#
210 #======================================#===========#=====#
211 2.6 EXAMINE. Descriptives
212 #=========================================================================#=========#==========#
213 # Manufacturer #Statistic|Std. Error#
214 #=========================================================================#=========#==========#
215 #Breaking Strain Aspeger Mean # 2.25 | .453 #
216 # 95% Confidence Interval for Mean Lower Bound# 1.178 | #
217 # Upper Bound# 3.322 | #
218 # 5% Trimmed Mean # 2.22 | #
220 # Variance # 1.643 | #
221 # Std. Deviation # 1.282 | #
222 # Minimum # 1.000 | #
223 # Maximum # 4.000 | #
225 # Interquartile Range # 2.75 | #
226 # Skewness # .475 | .752 #
227 # Kurtosis # -1.546 | 1.481 #
228 # ----------------------------------------------------------#---------+----------#
229 # Bloggs Mean # 3.50 | .378 #
230 # 95% Confidence Interval for Mean Lower Bound# 2.606 | #
231 # Upper Bound# 4.394 | #
232 # 5% Trimmed Mean # 3.50 | #
234 # Variance # 1.143 | #
235 # Std. Deviation # 1.069 | #
236 # Minimum # 2.000 | #
237 # Maximum # 5.000 | #
239 # Interquartile Range # 1.75 | #
240 # Skewness # -.468 | .752 #
241 # Kurtosis # -.831 | 1.481 #
242 # ----------------------------------------------------------#---------+----------#
243 # Charlies Mean # 4.88 | .441 #
244 # 95% Confidence Interval for Mean Lower Bound# 3.833 | #
245 # Upper Bound# 5.917 | #
246 # 5% Trimmed Mean # 4.86 | #
248 # Variance # 1.554 | #
249 # Std. Deviation # 1.246 | #
250 # Minimum # 3.000 | #
251 # Maximum # 7.000 | #
253 # Interquartile Range # 1.75 | #
254 # Skewness # .304 | .752 #
255 # Kurtosis # .146 | 1.481 #
256 #=========================================================================#=========#==========#
258 if [ $? -ne 0 ] ; then fail ; fi