output: Introduce pivot tables.
[pspp] / tests / language / stats / examine.at
index 9d4374d376e0e96c731382a8f4bceb0121436189..b2afe616b86f5750e670d03b23adb561b885a0aa 100644 (file)
@@ -87,7 +87,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-Breaking Strain,24.00,100%,.00,0%,24.00,100%
+Breaking Strain,24.00,100.0%,.00,.0%,24.00,100.0%
 
 Table: Extreme Values
 ,,,Case Number,Value
@@ -118,9 +118,9 @@ Table: Case Processing Summary
 ,,Cases,,,,,
 ,,Valid,,Missing,,Total,
 ,Manufacturer,N,Percent,N,Percent,N,Percent
-Breaking Strain,Aspeger,8.00,100%,.00,0%,8.00,100%
-,Bloggs,8.00,100%,.00,0%,8.00,100%
-,Charlies,8.00,100%,.00,0%,8.00,100%
+Breaking Strain,Aspeger,8.00,100.0%,.00,.0%,8.00,100.0%
+,Bloggs,8.00,100.0%,.00,.0%,8.00,100.0%
+,Charlies,8.00,100.0%,.00,.0%,8.00,100.0%
 
 Table: Extreme Values
 ,Manufacturer,,,Case Number,Value
@@ -228,7 +228,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-V1,23.00,100%,.00,0%,23.00,100%
+V1,23.00,100.0%,.00,.0%,23.00,100.0%
 
 Table: Extreme Values
 ,,,Case Number,Value
@@ -290,7 +290,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-x,19.430,100%,.000,0%,19.430,100%
+x,19.430,100.0%,.000,.0%,19.430,100.0%
 
 Table: Extreme Values
 ,,,Case Number,Value
@@ -352,7 +352,7 @@ EXAMINE /x
 EXAMINE /x
        /PERCENTILES=AEMPIRICAL.
 ])
-AT_CHECK([pspp -o pspp.csv examine.sps])
+AT_CHECK([pspp -o pspp.csv -o pspp.txt examine.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Reading free-form data from INLINE.
 Variable,Format
@@ -362,19 +362,19 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-X,3,100%,0,0%,3,100%
+X,3,100.0%,0,.0%,3,100.0%
 
 Table: Percentiles
 ,,Percentiles,,,,,,
 ,,5,10,25,50,75,90,95
-X,HAverage,.40,.80,2.00,5.00,8.00,8.00,8.00
+X,Weighted Average,.40,.80,2.00,5.00,8.00,8.00,8.00
 ,Tukey's Hinges,,,3.50,5.00,6.50,,
 
 Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-X,3,100%,0,0%,3,100%
+X,3,100.0%,0,.0%,3,100.0%
 
 Table: Percentiles
 ,,Percentiles,,,,,,
@@ -386,36 +386,36 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-X,3,100%,0,0%,3,100%
+X,3,100.0%,0,.0%,3,100.0%
 
 Table: Percentiles
 ,,Percentiles,,,,,,
 ,,5,10,25,50,75,90,95
-X,Rounded,.00,.00,2.00,5.00,5.00,8.00,8.00
+X,Weighted Average,.00,.00,2.00,5.00,5.00,8.00,8.00
 ,Tukey's Hinges,,,3.50,5.00,6.50,,
 
 Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-X,3,100%,0,0%,3,100%
+X,3,100.0%,0,.0%,3,100.0%
 
 Table: Percentiles
 ,,Percentiles,,,,,,
 ,,5,10,25,50,75,90,95
-X,Empirical,2.00,2.00,2.00,5.00,8.00,8.00,8.00
+X,Weighted Average,2.00,2.00,2.00,5.00,8.00,8.00,8.00
 ,Tukey's Hinges,,,3.50,5.00,6.50,,
 
 Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-X,3,100%,0,0%,3,100%
+X,3,100.0%,0,.0%,3,100.0%
 
 Table: Percentiles
 ,,Percentiles,,,,,,
 ,,5,10,25,50,75,90,95
-X,Empirical with averaging,2.00,2.00,2.00,5.00,8.00,8.00,8.00
+X,Weighted Average,2.00,2.00,2.00,5.00,8.00,8.00,8.00
 ,Tukey's Hinges,,,3.50,5.00,6.50,,
 ])
 AT_CLEANUP
@@ -449,14 +449,14 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-x,6,85.7143%,1,14.2857%,7,100%
+x,6,85.7%,1,14.3%,7,100.0%
 
 Table: Case Processing Summary
 ,,Cases,,,,,
 ,,Valid,,Missing,,Total,
 ,y,N,Percent,N,Percent,N,Percent
-x,1.00,4,100%,0,0%,4,100%
-,2.00,2,66.6667%,1,33.3333%,3,100%
+x,1.00,4,100.0%,0,.0%,4,100.0%
+,2.00,2,66.7%,1,33.3%,3,100.0%
 ])
 AT_CLEANUP
 
@@ -483,8 +483,8 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-x,1,33.3333%,2,66.6667%,3,100%
-y,2,66.6667%,1,33.3333%,3,100%
+x,1,33.3%,2,66.7%,3,100.0%
+y,2,66.7%,1,33.3%,3,100.0%
 ])
 AT_CLEANUP
 
@@ -537,7 +537,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-X,52.00,100%,.00,0%,52.00,100%
+X,52.00,100.0%,.00,.0%,52.00,100.0%
 
 Table: Descriptives
 ,,,Statistic,Std. Error
@@ -657,7 +657,7 @@ AT_CLEANUP
 
 dnl Test that big input doesn't crash (bug 11307).
 AT_SETUP([EXAMINE -- big input doesn't crash])
-AT_KEYWORDS([categorical categoricals])
+AT_KEYWORDS([categorical categoricals slow])
 AT_DATA([examine.sps], [dnl
 INPUT PROGRAM.
        LOOP #I=1 TO 50000.
@@ -678,7 +678,7 @@ AT_CLEANUP
 dnl Another test that big input doesn't crash.
 dnl The actual bug that this checks for has been lost.
 AT_SETUP([EXAMINE -- big input doesn't crash 2])
-AT_KEYWORDS([categorical categoricals])
+AT_KEYWORDS([categorical categoricals slow])
 AT_DATA([make-big-input.pl], 
   [for ($i=0; $i<100000; $i++) { print "AB12\n" };
    for ($i=0; $i<100000; $i++) { print "AB04\n" };
@@ -739,20 +739,20 @@ AT_CHECK([pspp -O format=csv examine-id.sps], [0],
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-x,14,100%,0,0%,14,100%
+x,14,100.0%,0,.0%,14,100.0%
 
 Table: Extreme Values
 ,,,y,Value
 x,Highest,1,threehundred,300.00
-,,2,thirty      ,30.00
-,,3,twelve      ,12.00
-,,4,eleven      ,11.00
-,,5,ten         ,10.00
-,Lowest,1,one         ,1.00
-,,2,two         ,2.00
-,,3,three       ,3.00
-,,4,four        ,4.00
-,,5,five        ,5.00
+,,2,thirty,30.00
+,,3,twelve,12.00
+,,4,eleven,11.00
+,,5,ten,10.00
+,Lowest,1,one,1.00
+,,2,two,2.00
+,,3,three,3.00
+,,4,four,4.00
+,,5,five,5.00
 ])
 
 AT_CLEANUP 
@@ -840,8 +840,9 @@ EXAMINE
 ])
 
 
-AT_CHECK([pspp -O format=csv examine-report.sps], [0], [dnl
-Table: Reading free-form data from INLINE.
+AT_CHECK([pspp -o pspp.csv -o pspp.txt examine-report.sps])
+AT_CHECK([cat pspp.csv], [0],
+  [[Table: Reading free-form data from INLINE.
 Variable,Format
 x,F8.0
 g,F8.0
@@ -850,15 +851,18 @@ Table: Case Processing Summary
 ,,Cases,,,,,
 ,,Valid,,Missing,,Total,
 ,g,N,Percent,N,Percent,N,Percent
-x,. (missing),4,100%,0,0%,4,100%
-,1,9,100%,0,0%,9,100%
-,2,9,100%,0,0%,9,100%
-,9 (missing),4,100%,0,0%,4,100%
-,99 (missing),5,100%,0,0%,5,100%
+x,.,4,100.0%,0,.0%,4,100.0%
+,1,9,100.0%,0,.0%,9,100.0%
+,2,9,100.0%,0,.0%,9,100.0%
+,9[a],4,100.0%,0,.0%,4,100.0%
+,99[a],5,100.0%,0,.0%,5,100.0%
+
+Footnotes:
+a,User-missing value.
 
 Table: Extreme Values
 ,g,,,Case Number,Value
-x,. (missing),Highest,1,31,4004
+x,.,Highest,1,31,4004
 ,,,2,30,3003
 ,,,3,29,2002
 ,,,4,28,1001
@@ -888,7 +892,7 @@ x,. (missing),Highest,1,31,4004
 ,,,3,12,30
 ,,,4,13,40
 ,,,5,14,50
-,9 (missing),Highest,1,22,401
+,9[a],Highest,1,22,401
 ,,,2,21,301
 ,,,3,20,201
 ,,,4,19,101
@@ -898,7 +902,7 @@ x,. (missing),Highest,1,31,4004
 ,,,3,21,301
 ,,,4,22,401
 ,,,5,22,401
-,99 (missing),Highest,1,27,901
+,99[a],Highest,1,27,901
 ,,,2,26,801
 ,,,3,25,701
 ,,,4,24,601
@@ -908,8 +912,10 @@ x,. (missing),Highest,1,31,4004
 ,,,3,25,701
 ,,,4,26,801
 ,,,5,27,901
-])
 
+Footnotes:
+a,User-missing value.
+]])
 
 AT_CLEANUP 
 
@@ -1037,7 +1043,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-X,100,100%,0,0%,100,100%
+X,100,100.0%,0,.0%,100,100.0%
 
 Table: Descriptives
 ,,,Statistic,Std. Error
@@ -1136,7 +1142,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Valid,,Missing,,Total,
 ,N,Percent,N,Percent,N,Percent
-h,3.00,100%,.00,0%,3.00,100%
+h,3.00,100.0%,.00,.0%,3.00,100.0%
 
 Table: Extreme Values
 ,,,Case Number,Value
@@ -1150,5 +1156,97 @@ h,Highest,1,3,5.00
 
 AT_CLEANUP 
 
+dnl This is an example from doc/tutorial.texi
+dnl So if the results of this have to be changed in any way,
+dnl make sure to update that file.
+AT_SETUP([EXAMINE tutorial example 1])
+cp $top_srcdir/examples/repairs.sav .
+AT_DATA([repairs.sps], [dnl
+GET FILE='repairs.sav'.
+EXAMINE mtbf /STATISTICS=DESCRIPTIVES.
+COMPUTE mtbf_ln = LN (mtbf).
+EXAMINE mtbf_ln /STATISTICS=DESCRIPTIVES.
+])
+AT_CHECK([pspp -o pspp.csv -o pspp.txt repairs.sps])
+AT_CHECK([cat pspp.csv], [0], [dnl
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+Mean time between failures (months) ,15,100.0%,0,.0%,15,100.0%
+
+Table: Descriptives
+,,,Statistic,Std. Error
+Mean time between failures (months) ,Mean,,8.32,1.62
+,95% Confidence Interval for Mean,Lower Bound,4.85,
+,,Upper Bound,11.79,
+,5% Trimmed Mean,,7.69,
+,Median,,8.12,
+,Variance,,39.21,
+,Std. Deviation,,6.26,
+,Minimum,,1.63,
+,Maximum,,26.47,
+,Range,,24.84,
+,Interquartile Range,,5.83,
+,Skewness,,1.85,.58
+,Kurtosis,,4.49,1.12
 
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+mtbf_ln,15,100.0%,0,.0%,15,100.0%
+
+Table: Descriptives
+,,,Statistic,Std. Error
+mtbf_ln,Mean,,1.88,.19
+,95% Confidence Interval for Mean,Lower Bound,1.47,
+,,Upper Bound,2.29,
+,5% Trimmed Mean,,1.88,
+,Median,,2.09,
+,Variance,,.54,
+,Std. Deviation,,.74,
+,Minimum,,.49,
+,Maximum,,3.28,
+,Range,,2.79,
+,Interquartile Range,,.92,
+,Skewness,,-.16,.58
+,Kurtosis,,-.09,1.12
+])
+AT_CLEANUP
+
+dnl This is an example from doc/tutorial.texi
+dnl So if the results of this have to be changed in any way,
+dnl make sure to update that file.
+AT_SETUP([EXAMINE tutorial example 2])
+cp $top_srcdir/examples/physiology.sav .
+AT_DATA([examine.sps], [dnl
+GET FILE='physiology.sav'.
+EXAMINE height, weight /STATISTICS=EXTREME(3).
+])
+AT_CHECK([pspp -o pspp.csv -o pspp.txt examine.sps])
+AT_CHECK([cat pspp.csv], [0], [dnl
+Table: Case Processing Summary
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+Height in millimeters   ,40,100.0%,0,.0%,40,100.0%
+Weight in kilograms ,40,100.0%,0,.0%,40,100.0%
+
+Table: Extreme Values
+,,,Case Number,Value
+Height in millimeters   ,Highest,1,14,1903
+,,2,15,1884
+,,3,12,1802
+,Lowest,1,30,179
+,,2,31,1598
+,,3,28,1601
+Weight in kilograms ,Highest,1,13,92.1
+,,2,5,92.1
+,,3,17,91.7
+,Lowest,1,38,-55.6
+,,2,39,54.5
+,,3,33,55.4
+])
+AT_CLEANUP