1 AT_BANNER([MEANS procedure])
3 AT_SETUP([MEANS simple example])
5 AT_DATA([means-simple.sps], [dnl
8 data list notable list /score * factor *.
38 MEANS TABLES = score BY factor.
41 AT_CHECK([pspp -O format=csv means-simple.sps], [0],
43 Table: Case Processing Summary
45 ,Included,,Excluded,,Total,
46 ,N,Percent,N,Percent,N,Percent
47 score: factor,26,100%,0,0%,26,100%
48 score: ,26,100%,0,0%,26,100%
51 ,factor,Mean,N,Std. Deviation
52 score,1.00000,19.78947,19.00000,4.03566
53 ,2.00000,24.00000,7.00000,5.50757
56 ,Mean,N,Std. Deviation
57 score,20.92308,26.00000,4.75750
64 AT_SETUP([MEANS very simple example])
66 AT_DATA([means-vsimple.sps], [dnl
69 data list notable list /score.
80 AT_CHECK([pspp -O format=csv means-vsimple.sps], [0],
82 Table: Case Processing Summary
84 ,Included,,Excluded,,Total,
85 ,N,Percent,N,Percent,N,Percent
86 score: ,4,100%,0,0%,4,100%
89 ,Mean,N,Std. Deviation
90 score,1.50000,4.00000,.57735
98 AT_SETUP([MEANS default missing])
100 AT_DATA([means-dmiss.sps], [dnl
102 data list notable list /a * g1 * g2 *.
121 AT_CHECK([pspp -O format=csv means-dmiss.sps], [0],
123 Table: Case Processing Summary
125 ,Included,,Excluded,,Total,
126 ,N,Percent,N,Percent,N,Percent
127 a: g1 * g2,6,75%,2,25%,8,100%
128 a: g2,6,75%,2,25%,8,100%
129 a: ,7,87.5%,1,12.5%,8,100%
133 a,1.00,11.00,4.00,1.00
134 ,1.00,21.00,3.00,1.00
135 ,2.00,21.00,6.00,1.00
136 ,2.00,31.00,5.67,3.00
152 AT_SETUP([MEANS linear stats])
154 dnl Slightly more involved example to test the linear statistics
155 AT_DATA([means-linear.sps], [dnl
157 data list notable list /id * group * test1 *
171 add value labels /group 1 "experimental group" 2 "control group".
174 /cells = mean count stddev sum min max range variance kurt skew
179 AT_CHECK([pspp -O format=csv means-linear.sps], [0],
181 Table: Case Processing Summary
183 ,Included,,Excluded,,Total,
184 ,N,Percent,N,Percent,N,Percent
185 test1: group,10,100%,0,0%,10,100%
186 test1: ,10,100%,0,0%,10,100%
189 ,group,Mean,N,Std. Deviation,Sum,Min,Max,Range,Variance,Kurtosis,Skewness
190 test1,experimental group,86.2000,5.0000,8.9833,431.0000,75.0000,99.0000,24.0000,80.7000,.2727,.3858
191 ,control group,61.8000,5.0000,10.0598,309.0000,50.0000,71.0000,21.0000,101.2000,-3.0437,-.4830
194 ,Mean,N,Std. Deviation,Sum,Min,Max,Range,Variance,Kurtosis,Skewness
195 test1,74.0000,10.0000,15.6915,740.0000,50.0000,99.0000,49.0000,246.2222,-.5759,-.1262
201 AT_SETUP([MEANS standard errors])
203 AT_DATA([means-stderr.sps], [dnl
205 data list notable list /id * group * test1 *
220 /cells = mean count semean seskew sekurt.
224 AT_CHECK([pspp -O format=csv means-stderr.sps], [0],
226 Table: Case Processing Summary
228 ,Included,,Excluded,,Total,
229 ,N,Percent,N,Percent,N,Percent
230 test1: group,10,100%,0,0%,10,100%
231 test1: ,10,100%,0,0%,10,100%
234 ,group,Mean,N,S.E. Mean,S.E. Skew,S.E. Kurt
235 test1,1.0000,83.5000,6.0000,4.2485,.8452,1.7408
236 ,2.0000,59.7500,4.0000,5.1700,1.0142,2.6186
239 ,Mean,N,S.E. Mean,S.E. Skew,S.E. Kurt
240 test1,74.0000,10.0000,4.9621,.6870,1.3342
247 AT_SETUP([MEANS harmonic and geometric means])
249 AT_DATA([means-hg.sps], [dnl
251 data list notable list /x * y *.
262 /cells = mean harmonic geometric
267 AT_CHECK([pspp -O format=csv means-hg.sps], [0],
269 Table: Case Processing Summary
271 ,Included,,Excluded,,Total,
272 ,N,Percent,N,Percent,N,Percent
273 x: ,5,100%,0,0%,5,100%
274 y: ,5,100%,0,0%,5,100%
277 ,Mean,Harmonic Mean,Geom. Mean
278 x,3.0000,2.1898,2.6052
279 y,3.0000,3.0000,3.0000
289 AT_SETUP([MEANS all/none/default])
291 dnl Make sure that /CELLS = {ALL,NONE,DEFAULT} work properly
292 AT_DATA([means-stat-keywords.sps], [dnl
296 DATA LIST NOTABLE LIST /score *.
305 MEANS score /CELLS = ALL.
306 MEANS score /CELLS = DEFAULT.
307 MEANS score /CELLS = NONE.
311 AT_CHECK([pspp -O format=csv means-stat-keywords.sps], [0],
313 Table: Case Processing Summary
315 ,Included,,Excluded,,Total,
316 ,N,Percent,N,Percent,N,Percent
317 score: ,5,100%,0,0%,5,100%
320 ,Mean,N,Std. Deviation,S.E. Mean,Sum,Min,Max,Range,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,First,Last,Harmonic Mean,Geom. Mean
321 score,22.40,5.00,4.62,2.06,112.00,16.00,29.00,13.00,21.30,1.85,2.00,.11,.91,22.00,23.00,21.61,22.01
323 Table: Case Processing Summary
325 ,Included,,Excluded,,Total,
326 ,N,Percent,N,Percent,N,Percent
327 score: ,5,100%,0,0%,5,100%
330 ,Mean,N,Std. Deviation
331 score,22.40,5.00,4.62
333 Table: Case Processing Summary
335 ,Included,,Excluded,,Total,
336 ,N,Percent,N,Percent,N,Percent
337 score: ,5,100%,0,0%,5,100%
349 AT_SETUP([MEANS missing=table ])
351 AT_DATA([means-miss-table.sps], [dnl
352 data list notable list /a * b * g1.
376 AT_CHECK([pspp -O format=csv means-miss-table.sps], [0],
378 Table: Case Processing Summary
380 ,Included,,Excluded,,Total,
381 ,N,Percent,N,Percent,N,Percent
382 a: g1,7,100%,0,0%,7,100%
383 a: ,7,100%,0,0%,7,100%
384 b: g1,6,85.7143%,1,14.2857%,7,100%
385 b: ,6,85.7143%,1,14.2857%,7,100%
399 Table: Case Processing Summary
401 ,Included,,Excluded,,Total,
402 ,N,Percent,N,Percent,N,Percent
403 a: g1,7,100%,0,0%,7,100%
404 a: ,7,100%,0,0%,7,100%
415 Table: Case Processing Summary
417 ,Included,,Excluded,,Total,
418 ,N,Percent,N,Percent,N,Percent
419 a: g1,7,100%,0,0%,7,100%
420 a: ,7,100%,0,0%,7,100%
421 b: g1,6,85.7143%,1,14.2857%,7,100%
422 b: ,6,85.7143%,1,14.2857%,7,100%
436 Table: Case Processing Summary
438 ,Included,,Excluded,,Total,
439 ,N,Percent,N,Percent,N,Percent
440 a: g1,7,100%,0,0%,7,100%
441 a: ,7,100%,0,0%,7,100%
459 AT_SETUP([MEANS user missing values])
461 AT_DATA([means-missing.sps], [dnl
462 data list notable list /a * b * g1.
473 MISSING VALUES a b g1 (9).
475 MEANS a b BY g1 /cells = COUNT .
477 MEANS a b BY g1 /cells = COUNT /missing = include .
479 MEANS a b BY g1 /cells = COUNT /missing = dependent .
483 AT_CHECK([pspp -O format=csv means-missing.sps], [0],
485 Table: Case Processing Summary
487 ,Included,,Excluded,,Total,
488 ,N,Percent,N,Percent,N,Percent
489 a: g1,6,85.7143%,1,14.2857%,7,100%
490 a: ,7,100%,0,0%,7,100%
491 b: g1,5,71.4286%,2,28.5714%,7,100%
492 b: ,6,85.7143%,1,14.2857%,7,100%
506 Table: Case Processing Summary
508 ,Included,,Excluded,,Total,
509 ,N,Percent,N,Percent,N,Percent
510 a: g1,7,100%,0,0%,7,100%
511 a: ,7,100%,0,0%,7,100%
512 b: g1,7,100%,0,0%,7,100%
513 b: ,7,100%,0,0%,7,100%
529 Table: Case Processing Summary
531 ,Included,,Excluded,,Total,
532 ,N,Percent,N,Percent,N,Percent
533 a: g1,7,100%,0,0%,7,100%
534 a: ,7,100%,0,0%,7,100%
535 b: g1,6,85.7143%,1,14.2857%,7,100%
536 b: ,6,85.7143%,1,14.2857%,7,100%
557 AT_SETUP([MEANS empty factor spec])
559 AT_DATA([means-bad.sps], [dnl
560 data list list /outcome *.
567 MEANS TABLES = outcome
571 AT_CHECK([pspp -O format=csv means-bad.sps], [1], [ignore])