output: Introduce pivot tables.
[pspp] / tests / language / dictionary / weight.at
1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
3 dnl 
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
8 dnl 
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl GNU General Public License for more details.
13 dnl 
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 dnl
17 AT_BANNER([WEIGHT])
18
19 AT_SETUP([WEIGHT])
20 AT_DATA([weight.txt], [dnl
21    18    1
22    19    7
23    20   26
24    21   76
25    22   57
26    23   58
27    24   38
28    25   38
29    26   30
30    27   21
31    28   23
32    29   24
33    30   23
34    31   14
35    32   21
36    33   21
37    34   14
38    35   14
39    36   17
40    37   11
41    38   16
42    39   14
43    40   15
44    41   14
45    42   14
46    43    8
47    44   15
48    45   10
49    46   12
50    47   13
51    48   13
52    49    5
53    50    5
54    51    3
55    52    7
56    53    6
57    54    2
58    55    2
59    56    2
60    57    3
61    58    1
62    59    3
63    61    1
64    62    3
65    63    1
66    64    1
67    65    2
68    70    1
69    78    1
70    79    1
71    80    1
72    94    1
73 ])
74 AT_DATA([weight.sps], [dnl
75 SET FORMAT F8.3.
76 data list file='weight.txt'/AVAR 1-5 BVAR 6-10.
77 weight by BVAR.
78
79 descriptives AVAR /statistics all /format serial.
80 frequencies AVAR /statistics all.
81 ])
82 AT_CHECK([pspp -o pspp.csv -o pspp.txt weight.sps])
83 AT_CHECK([cat pspp.csv], [0], [dnl
84 Table: Reading 1 record from `weight.txt'.
85 Variable,Record,Columns,Format
86 AVAR,1,1-  5,F5.0
87 BVAR,1,6- 10,F5.0
88
89 Table: Descriptive Statistics
90 ,N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
91 AVAR,730,31.515,.405,10.937,119.608,2.411,.181,1.345,.090,76.000,18,94,23006.00
92 Valid N (listwise),730,,,,,,,,,,,,
93 Missing N (listwise),0,,,,,,,,,,,,
94
95 Table: Statistics
96 ,,AVAR
97 N,Valid,730
98 ,Missing,0
99 Mean,,31.515
100 S.E. Mean,,.405
101 Median,,28.000
102 Mode,,21
103 Std Dev,,10.937
104 Variance,,119.608
105 Kurtosis,,2.411
106 S.E. Kurt,,.181
107 Skewness,,1.345
108 S.E. Skew,,.090
109 Range,,76.000
110 Minimum,,18
111 Maximum,,94
112 Sum,,23006.00
113
114 Table: AVAR
115 ,,Frequency,Percent,Valid Percent,Cumulative Percent
116 Valid,18,1,.1%,.1%,.1%
117 ,19,7,1.0%,1.0%,1.1%
118 ,20,26,3.6%,3.6%,4.7%
119 ,21,76,10.4%,10.4%,15.1%
120 ,22,57,7.8%,7.8%,22.9%
121 ,23,58,7.9%,7.9%,30.8%
122 ,24,38,5.2%,5.2%,36.0%
123 ,25,38,5.2%,5.2%,41.2%
124 ,26,30,4.1%,4.1%,45.3%
125 ,27,21,2.9%,2.9%,48.2%
126 ,28,23,3.2%,3.2%,51.4%
127 ,29,24,3.3%,3.3%,54.7%
128 ,30,23,3.2%,3.2%,57.8%
129 ,31,14,1.9%,1.9%,59.7%
130 ,32,21,2.9%,2.9%,62.6%
131 ,33,21,2.9%,2.9%,65.5%
132 ,34,14,1.9%,1.9%,67.4%
133 ,35,14,1.9%,1.9%,69.3%
134 ,36,17,2.3%,2.3%,71.6%
135 ,37,11,1.5%,1.5%,73.2%
136 ,38,16,2.2%,2.2%,75.3%
137 ,39,14,1.9%,1.9%,77.3%
138 ,40,15,2.1%,2.1%,79.3%
139 ,41,14,1.9%,1.9%,81.2%
140 ,42,14,1.9%,1.9%,83.2%
141 ,43,8,1.1%,1.1%,84.2%
142 ,44,15,2.1%,2.1%,86.3%
143 ,45,10,1.4%,1.4%,87.7%
144 ,46,12,1.6%,1.6%,89.3%
145 ,47,13,1.8%,1.8%,91.1%
146 ,48,13,1.8%,1.8%,92.9%
147 ,49,5,.7%,.7%,93.6%
148 ,50,5,.7%,.7%,94.2%
149 ,51,3,.4%,.4%,94.7%
150 ,52,7,1.0%,1.0%,95.6%
151 ,53,6,.8%,.8%,96.4%
152 ,54,2,.3%,.3%,96.7%
153 ,55,2,.3%,.3%,97.0%
154 ,56,2,.3%,.3%,97.3%
155 ,57,3,.4%,.4%,97.7%
156 ,58,1,.1%,.1%,97.8%
157 ,59,3,.4%,.4%,98.2%
158 ,61,1,.1%,.1%,98.4%
159 ,62,3,.4%,.4%,98.8%
160 ,63,1,.1%,.1%,98.9%
161 ,64,1,.1%,.1%,99.0%
162 ,65,2,.3%,.3%,99.3%
163 ,70,1,.1%,.1%,99.5%
164 ,78,1,.1%,.1%,99.6%
165 ,79,1,.1%,.1%,99.7%
166 ,80,1,.1%,.1%,99.9%
167 ,94,1,.1%,.1%,100.0%
168 Total,,730,100.0%,,
169 ])
170 AT_CLEANUP