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
25 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
26 echo "NOT cleaning $TEMPDIR"
61 activity="create program"
63 DATA LIST LIST /QUALITY * W * BRAND * .
85 VARIABLE LABELS brand 'Manufacturer'.
86 VARIABLE LABELS quality 'Breaking Strain'.
88 VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'.
90 LIST /FORMAT=NUMBERED.
94 /STATISTICS descriptives extreme(3)
97 if [ $? -ne 0 ] ; then no_result ; fi
100 activity="run program"
101 $SUPERVISOR $PSPP --testing-mode $TESTFILE
102 if [ $? -ne 0 ] ; then no_result ; fi
104 # NOTE: In the following data: Only the extreme values have been checked
105 # The descriptives have been blindly pasted.
106 activity="compare results"
107 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
108 diff -b $TEMPDIR/pspp.list - << EOF
109 1.1 DATA LIST. Reading free-form data from INLINE.
117 Case# QUALITY W BRAND
118 ----- -------- -------- --------
135 2.1 EXAMINE. Case Processing Summary
136 #===============#=======================================#
138 # #-------------+-----------+-------------#
139 # # Valid | Missing | Total #
140 # #-----+-------+---+-------+-----+-------#
141 # # N |Percent| N |Percent| N |Percent#
142 #===============#=====#=======#===#=======#=====#=======#
143 #Breaking Strain#24.00| 100%|.00| 0%|24.00| 100%#
144 #===============#=====#=======#===#=======#=====#=======#
145 2.2 EXAMINE. Extreme Values
146 #=========================#===========#=====#
147 # #Case Number|Value#
148 #=========================#===========#=====#
149 #Breaking Strain Highest 1# 12| 7.00#
152 # ----------#-----------+-----#
156 #=========================#===========#=====#
157 2.3 EXAMINE. Descriptives
158 #============================================================#=========#==========#
159 # #Statistic|Std. Error#
160 #============================================================#=========#==========#
161 #Breaking Strain Mean # 3.54 | .32 #
162 # 95% Confidence Interval for Mean Lower Bound# 2.87 | #
163 # Upper Bound# 4.21 | #
164 # 5% Trimmed Mean # 3.50 | #
166 # Variance # 2.52 | #
167 # Std. Deviation # 1.59 | #
171 # Interquartile Range # 2.75 | #
172 # Skewness # .06 | .47 #
173 # Kurtosis # -.36 | .92 #
174 #============================================================#=========#==========#
175 2.4 EXAMINE. Case Processing Summary
176 #============================#=====================================#
178 # #------------+-----------+------------#
179 # # Valid | Missing | Total #
180 # #----+-------+---+-------+----+-------#
181 # Manufacturer# N |Percent| N |Percent| N |Percent#
182 #============================#====#=======#===#=======#====#=======#
183 #Breaking Strain Aspeger #8.00| 100%|.00| 0%|8.00| 100%#
184 # Bloggs #8.00| 100%|.00| 0%|8.00| 100%#
185 # Charlies #8.00| 100%|.00| 0%|8.00| 100%#
186 #============================#====#=======#===#=======#====#=======#
187 2.5 EXAMINE. Extreme Values
188 #======================================#===========#=====#
189 # Manufacturer #Case Number|Value#
190 #======================================#===========#=====#
191 #Breaking Strain Aspeger Highest 1# 5| 4.00#
194 # ----------#-----------+-----#
198 # -----------------------#-----------+-----#
199 # Bloggs Highest 1# 7| 5.00#
202 # ----------#-----------+-----#
206 # -----------------------#-----------+-----#
207 # Charlies Highest 1# 12| 7.00#
210 # ----------#-----------+-----#
211 # Lowest 1# 15| 3.00#
214 #======================================#===========#=====#
215 2.6 EXAMINE. Descriptives
216 #=========================================================================#=========#==========#
217 # Manufacturer #Statistic|Std. Error#
218 #=========================================================================#=========#==========#
219 #Breaking Strain Aspeger Mean # 2.25 | .45 #
220 # 95% Confidence Interval for Mean Lower Bound# 1.18 | #
221 # Upper Bound# 3.32 | #
222 # 5% Trimmed Mean # 2.22 | #
224 # Variance # 1.64 | #
225 # Std. Deviation # 1.28 | #
229 # Interquartile Range # 2.75 | #
230 # Skewness # .47 | .75 #
231 # Kurtosis # -1.55 | 1.48 #
232 # ----------------------------------------------------------#---------+----------#
233 # Bloggs Mean # 3.50 | .38 #
234 # 95% Confidence Interval for Mean Lower Bound# 2.61 | #
235 # Upper Bound# 4.39 | #
236 # 5% Trimmed Mean # 3.50 | #
238 # Variance # 1.14 | #
239 # Std. Deviation # 1.07 | #
243 # Interquartile Range # 1.75 | #
244 # Skewness # -.47 | .75 #
245 # Kurtosis # -.83 | 1.48 #
246 # ----------------------------------------------------------#---------+----------#
247 # Charlies Mean # 4.88 | .44 #
248 # 95% Confidence Interval for Mean Lower Bound# 3.83 | #
249 # Upper Bound# 5.92 | #
250 # 5% Trimmed Mean # 4.86 | #
252 # Variance # 1.55 | #
253 # Std. Deviation # 1.25 | #
257 # Interquartile Range # 1.75 | #
258 # Skewness # .30 | .75 #
259 # Kurtosis # .15 | 1.48 #
260 #=========================================================================#=========#==========#
262 if [ $? -ne 0 ] ; then fail ; fi