4 AT_DATA([examine.sps], [
5 DATA LIST LIST /QUALITY * W * BRAND * .
27 VARIABLE LABELS brand 'Manufacturer'.
28 VARIABLE LABELS quality 'Breaking Strain'.
30 VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'.
32 LIST /FORMAT=NUMBERED.
36 /STATISTICS descriptives extreme(3)
39 AT_CHECK([pspp -o pspp.csv examine.sps])
40 dnl In the following data, only the extreme values have been checked.
41 dnl The descriptives have been blindly pasted.
42 AT_CHECK([cat pspp.csv], [0], [dnl
43 Table: Reading free-form data from INLINE.
50 Case Number,QUALITY,W,BRAND
68 Table: Case Processing Summary
70 ,Valid,,Missing,,Total,
71 ,N,Percent,N,Percent,N,Percent
72 Breaking Strain,24.00,100%,.00,0%,24.00,100%
76 Breaking Strain,Highest,1,12,7.00
84 ,,,Statistic,Std. Error
85 Breaking Strain,Mean,,3.54,.32
86 ,95% Confidence Interval for Mean,Lower Bound,2.87,
88 ,5% Trimmed Mean,,3.50,
91 ,Std. Deviation,,1.59,
95 ,Interquartile Range,,2.75,
99 Table: Case Processing Summary
101 ,,Valid,,Missing,,Total,
102 ,Manufacturer,N,Percent,N,Percent,N,Percent
103 Breaking Strain,Aspeger,8.00,100%,.00,0%,8.00,100%
104 ,Bloggs,8.00,100%,.00,0%,8.00,100%
105 ,Charlies,8.00,100%,.00,0%,8.00,100%
107 Table: Extreme Values
108 ,Manufacturer,,,Case Number,Value
109 Breaking Strain,Aspeger,Highest,1,5,4.00
115 ,Bloggs,Highest,1,7,5.00
121 ,Charlies,Highest,1,12,7.00
129 ,Manufacturer,,,Statistic,Std. Error
130 Breaking Strain,Aspeger,Mean,,2.25,.45
131 ,,95% Confidence Interval for Mean,Lower Bound,1.18,
133 ,,5% Trimmed Mean,,2.22,
136 ,,Std. Deviation,,1.28,
140 ,,Interquartile Range,,2.75,
142 ,,Kurtosis,,-1.55,1.48
143 ,Bloggs,Mean,,3.50,.38
144 ,,95% Confidence Interval for Mean,Lower Bound,2.61,
146 ,,5% Trimmed Mean,,3.50,
149 ,,Std. Deviation,,1.07,
153 ,,Interquartile Range,,1.75,
155 ,,Kurtosis,,-.83,1.48
156 ,Charlies,Mean,,4.88,.44
157 ,,95% Confidence Interval for Mean,Lower Bound,3.83,
159 ,,5% Trimmed Mean,,4.86,
162 ,,Std. Deviation,,1.25,
166 ,,Interquartile Range,,1.75,
172 AT_SETUP([EXAMINE -- extremes])
173 AT_DATA([examine.sps], [dnl
202 /statistics=extreme(6)
205 AT_CHECK([pspp -o pspp.csv examine.sps])
206 AT_CHECK([cat pspp.csv], [0], [dnl
207 Table: Case Processing Summary
209 ,Valid,,Missing,,Total,
210 ,N,Percent,N,Percent,N,Percent
211 V1,23.00,100%,.00,0%,23.00,100%
213 Table: Extreme Values
215 V1,Highest,1,21,20.00
230 dnl Test the PERCENTILES subcommand of the EXAMINE command.
231 dnl In particular test that it behaves properly when there are only
233 AT_SETUP([EXAMINE -- percentiles])
234 AT_DATA([examine.sps], [dnl
243 /PERCENTILES=HAVERAGE.
246 /PERCENTILES=WAVERAGE.
252 /PERCENTILES=EMPIRICAL.
255 /PERCENTILES=AEMPIRICAL.
257 AT_CHECK([pspp -o pspp.csv examine.sps])
258 AT_CHECK([cat pspp.csv], [0], [dnl
259 Table: Reading free-form data from INLINE.
263 Table: Case Processing Summary
265 ,Valid,,Missing,,Total,
266 ,N,Percent,N,Percent,N,Percent
271 ,,5,10,25,50,75,90,95
272 X,HAverage,.40,.80,2.00,5.00,8.00,8.00,8.00
273 ,Tukey's Hinges,,,3.50,5.00,6.50,,
275 Table: Case Processing Summary
277 ,Valid,,Missing,,Total,
278 ,N,Percent,N,Percent,N,Percent
283 ,,5,10,25,50,75,90,95
284 X,Weighted Average,.30,.60,1.50,3.50,5.75,7.10,7.55
285 ,Tukey's Hinges,,,3.50,5.00,6.50,,
287 Table: Case Processing Summary
289 ,Valid,,Missing,,Total,
290 ,N,Percent,N,Percent,N,Percent
295 ,,5,10,25,50,75,90,95
296 X,Rounded,.00,.00,2.00,5.00,5.00,8.00,8.00
297 ,Tukey's Hinges,,,3.50,5.00,6.50,,
299 Table: Case Processing Summary
301 ,Valid,,Missing,,Total,
302 ,N,Percent,N,Percent,N,Percent
307 ,,5,10,25,50,75,90,95
308 X,Empirical,2.00,2.00,2.00,5.00,8.00,8.00,8.00
309 ,Tukey's Hinges,,,3.50,5.00,6.50,,
311 Table: Case Processing Summary
313 ,Valid,,Missing,,Total,
314 ,N,Percent,N,Percent,N,Percent
319 ,,5,10,25,50,75,90,95
320 X,Empirical with averaging,2.00,2.00,2.00,5.00,8.00,8.00,8.00
321 ,Tukey's Hinges,,,3.50,5.00,6.50,,
325 AT_SETUP([EXAMINE -- missing values])
326 AT_DATA([examine.sps], [dnl
327 DATA LIST LIST /x * y *.
340 AT_CHECK([pspp -o pspp.csv examine.sps])
341 AT_CHECK([cat pspp.csv], [0], [dnl
342 Table: Reading free-form data from INLINE.
347 Table: Case Processing Summary
349 ,Valid,,Missing,,Total,
350 ,N,Percent,N,Percent,N,Percent
351 x,6,85.7143%,1,14.2857%,7,100%
353 Table: Case Processing Summary
355 ,,Valid,,Missing,,Total,
356 ,y,N,Percent,N,Percent,N,Percent
357 x,1.00,4,100%,0,0%,4,100%
358 ,2.00,2,66.6667%,1,33.3333%,3,100%
362 AT_SETUP([EXAMINE -- missing values and percentiles])
363 AT_DATA([examine.sps], [dnl
371 MISSING VALUE X (99).
374 /PERCENTILES=HAVERAGE.
376 AT_CHECK([pspp -o pspp.csv examine.sps])
377 dnl Ignore output -- this is just a no-crash check.
380 AT_SETUP([EXAMINE -- crash bug])
381 AT_DATA([examine.sps], [dnl
382 data list list /a * x * y *.
390 /statistics=DESCRIPTIVES
393 AT_CHECK([pspp -o pspp.csv examine.sps])
394 dnl Ignore output -- this is just a no-crash check.
397 dnl Test that two consecutive EXAMINE commands don't crash PSPP.
398 AT_SETUP([EXAMINE -- consecutive runs don't crash])
399 AT_DATA([examine.sps], [dnl
400 data list list /y * z *.
407 EXAMINE /VARIABLES= z BY y.
409 EXAMINE /VARIABLES= z.
411 AT_CHECK([pspp -o pspp.csv examine.sps])
412 dnl Ignore output -- this is just a no-crash check.
415 dnl Test that /DESCRIPTIVES does not crash in presence of missing values.
416 AT_SETUP([EXAMINE -- missing values don't crash])
417 AT_DATA([examine.sps], [dnl
418 data list list /x * y *.
426 examine x by y /statistics=descriptives.
428 AT_CHECK([pspp -o pspp.csv examine.sps])
429 dnl Ignore output -- this is just a no-crash check.
432 dnl Test that having only a single case doesn't crash.
433 AT_SETUP([EXAMINE -- single case doesn't crash])
434 AT_DATA([examine.sps], [dnl
435 DATA LIST LIST /quality * .
443 /STATISTICS descriptives
446 AT_CHECK([pspp -o pspp.csv examine.sps])
447 dnl Ignore output -- this is just a no-crash check.
450 dnl Test that all-missing data doesn't crash.
451 AT_SETUP([EXAMINE -- all-missing data doesn't crash])
452 AT_DATA([examine.sps], [dnl
461 EXAMINE /x PLOT=HISTOGRAM.
463 AT_CHECK([pspp -o pspp.csv examine.sps], [0], [dnl
464 warning: Not creating plot because data set is empty.
466 dnl Ignore output -- this is just a no-crash check.