Enable the show value labels feature
[pspp] / tests / language / stats / reliability.at
1 AT_BANNER([RELIABILITY])
2
3 AT_SETUP([RELIABILITY])
4 AT_DATA([reliability.sps], [dnl
5 data list notable list  /var1 *
6         var2  *
7         var6  *
8         var7  *
9         var8  *
10         var9  *
11         var11 *
12         var12 *
13         var15 *
14         var16 *
15         var17 *
16         var19 *
17         .
18
19 begin data.
20 6 7 7 5 7 7 7 7 7 7 6 6
21 6 7 7 6 7 6 7 5 6 5 7 7
22 6 6 7 6 5 3 6 4 5 6 4 5
23 4 6 5 6 6 5 4 3 5 6 5 6
24 5 6 5 5 6 5 4 4 6 6 5 5
25 6 6 7 6 6 5 6 5 6 6 5 6
26 5 6 6 5 6 5 5 4 6 5 5 5
27 5 7 7 7 7 7 6 5 7 7 7 7
28 6 6 6 5 5 7 6 5 6 6 5 6
29 . . . . . . . . . . . .
30 6 6 5 5 5 6 6 4 6 5 5 5
31 7 7 7 6 7 6 7 6 6 6 7 6
32 4 7 6 6 6 5 5 4 4 5 5 6
33 5 6 3 5 4 1 4 6 2 3 3 2
34 3 6 6 5 6 2 4 2 2 4 4 5
35 6 6 7 5 6 5 7 6 5 6 6 5
36 6 5 6 6 5 6 6 6 6 4 5 5
37 5 7 7 . 6 6 6 5 6 6 6 6
38 5 7 5 5 4 6 7 6 5 4 6 5
39 7 7 7 6 7 7 7 6 7 7 7 6
40 3 6 5 6 5 7 7 3 4 7 5 7
41 6 7 7 6 5 6 5 5 6 6 6 6
42 5 5 6 5 5 5 5 4 5 5 5 6
43 6 6 7 4 5 6 6 6 6 5 5 6
44 6 5 6 6 4 4 5 4 5 6 4 5
45 5 6 7 6 6 7 7 5 6 6 6 5
46 5 6 5 7 4 6 6 5 7 7 5 6
47 . . . . . . . . . . . .
48 7 6 6 5 6 6 7 6 6 5 5 6
49 6 6 7 7 7 7 7 6 7 6 6 7
50 7 5 5 . 5 . 7 3 5 4 5 3
51 7 6 7 5 4 5 7 5 7 5 5 6
52 6 5 6 6 6 5 5 5 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.
93 6 6 7 6 7 6 7 7 6 7 7 6
94 . . . . . . . . . . . .
95 5 6 5 7 6 5 6 6 5 6 4 6
96 5 5 5 5 4 5 5 5 7 5 5 5
97 6 6 6 4 5 4 6 6 6 4 5 4
98 6 5 7 4 6 4 6 5 6 6 6 3
99 5 7 6 5 5 5 5 5 6 7 6 6
100 5 5 7 7 5 5 6 6 5 5 5 7
101 5 6 7 6 7 5 6 4 6 7 6 7
102 4 5 5 5 6 5 6 5 6 6 5 6
103 6 5 5 5 6 3 4 5 5 4 5 3
104 6 6 6 5 5 5 4 3 4 5 5 5
105 6 7 7 6 2 3 6 6 6 5 7 7
106 6 7 5 5 6 6 6 5 6 6 6 6
107 6 7 7 6 7 7 7 5 5 6 6 6
108 6 6 6 6 7 6 6 7 6 6 6 6
109 5 6 6 6 3 5 6 6 5 5 4 6
110 4 6 5 6 6 5 6 5 6 6 5 5
111 6 4 6 5 4 6 7 4 5 6 5 5
112 6 7 6 4 6 5 7 6 7 7 6 5
113 6 7 7 6 7 6 7 7 7 6 6 6
114 6 6 6 4 5 6 7 7 5 6 4 4
115 3 3 5 3 3 1 5 6 3 2 3 3
116 7 7 5 6 6 7 7 6 7 7 7 7
117 5 6 6 6 7 5 4 5 4 7 6 7
118 3 6 5 4 3 3 3 5 5 6 3 4
119 5 7 6 4 6 5 5 6 6 7 5 6
120 5 7 6 6 6 6 6 5 6 7 7 6
121 7 7 5 6 7 7 7 7 6 5 7 7
122 6 7 6 6 5 6 7 7 6 5 6 6
123 6 7 7 7 7 6 6 7 6 7 7 7
124 4 6 4 7 3 6 5 5 4 3 5 6
125 5 5 7 5 4 6 7 5 4 6 6 5
126 5 5 6 4 6 5 7 6 5 5 5 6
127 . . . . . . . . . . . .
128 . . . . . . . . . . . .
129 5 7 7 5 6 6 7 7 6 6 6 7
130 6 7 7 1 2 1 7 7 5 5 5 2
131 . . . . . . . . . . . .
132 3 7 4 6 4 7 4 6 4 7 4 7
133 5 7 3 5 5 6 7 5 4 7 7 4
134 4 7 7 5 4 6 7 7 6 5 4 4
135 6 6 2 2 6 4 6 5 5 1 5 2
136 5 5 6 4 5 4 6 5 5 6 5 5
137 . . . . . . . . . . . .
138 5 7 6 6 6 6 6 6 5 6 6 6
139 6 6 6 5 6 6 6 6 7 5 6 7
140 3 6 3 3 5 3 3 5 3 5 7 4
141 4 4 6 3 3 3 4 3 4 2 3 6
142 5 7 7 6 5 4 7 5 7 7 3 7
143 4 5 4 4 4 4 3 3 3 4 3 3
144 6 7 7 5 6 6 7 5 4 5 5 5
145 3 5 3 3 1 3 4 3 4 7 6 7
146 4 5 4 4 4 3 4 5 6 6 4 5
147 5 6 3 4 5 3 5 3 4 5 6 4
148 5 5 5 6 6 6 6 4 5 6 6 5
149 6 7 7 2 2 6 7 7 7 7 5 7
150 5 7 7 4 6 5 7 5 5 5 6 6
151 6 6 7 7 5 5 5 7 6 7 7 7
152 6 5 7 3 6 5 6 5 5 6 5 4
153 5 7 6 5 6 6 6 5 6 5 5 6
154 4 5 5 5 6 3 5 3 3 6 5 5
155 . . . . . . . . . . . .
156 5 6 6 4 4 4 5 3 5 5 2 6
157 5 6 7 5 5 6 6 5 5 6 6 6
158 6 7 7 6 4 7 7 6 7 5 6 7
159 6 6 5 4 5 2 7 6 6 5 6 6
160 2 2 2 2 2 2 3 2 3 1 1 2
161 end data.
162
163 RELIABILITY
164   /VARIABLES=var2 var8 var15 var17 var6
165   /SCALE('Everything') var6 var8 var15 var17
166   /MODEL=ALPHA.
167
168 RELIABILITY
169   /VARIABLES=var6 var8 var15 var17
170   /SCALE('Nothing') ALL
171   /MODEL=SPLIT(2)
172  .
173
174 RELIABILITY
175   /VARIABLES=var2 var6 var8 var15 var17 var19
176   /SCALE('Totals') var6 var8 var15 var17 
177   /SUMMARY = total
178   /STATISTICS = DESCRIPTIVES COVARIANCES
179  .
180
181
182 RELIABILITY
183   /VARIABLES=var6 var8 var15 var17 
184   .
185 ])
186 AT_CHECK([pspp -o pspp.csv reliability.sps], [0],
187   [reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented.  No statistics will be produced.
188 ])
189 AT_CHECK([cat pspp.csv], [0], [dnl
190 Scale: Everything
191
192 Table: Case Processing Summary
193 ,,N,%
194 Cases,Valid,131,92.91
195 ,Excluded,10,7.09
196 ,Total,141,100.00
197
198 Table: Reliability Statistics
199 Cronbach's Alpha,N of Items
200 .75,4
201
202 Scale: Nothing
203
204 Table: Case Processing Summary
205 ,,N,%
206 Cases,Valid,131,92.91
207 ,Excluded,10,7.09
208 ,Total,141,100.00
209
210 Table: Reliability Statistics
211 Cronbach's Alpha,Part 1,Value,.55
212 ,,N of Items,2
213 ,Part 2,Value,.63
214 ,,N of Items,2
215 ,Total N of Items,,4
216 Correlation Between Forms,,,.61
217 Spearman-Brown Coefficient,Equal Length,,.75
218 ,Unequal Length,,.75
219 Guttman Split-Half Coefficient,,,.75
220
221 reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented.  No statistics will be produced.
222
223 Scale: Totals
224
225 Table: Case Processing Summary
226 ,,N,%
227 Cases,Valid,131,92.91
228 ,Excluded,10,7.09
229 ,Total,141,100.00
230
231 Table: Reliability Statistics
232 Cronbach's Alpha,N of Items
233 .75,4
234
235 Table: Item-Total Statistics
236 ,Scale Mean if Item Deleted,Scale Variance if Item Deleted,Corrected Item-Total Correlation,Cronbach's Alpha if Item Deleted
237 var6,15.97,8.43,.51,.71
238 var8,16.56,7.86,.53,.70
239 var15,16.47,8.45,.56,.68
240 var17,16.60,8.00,.57,.67
241
242 Scale: ANY
243
244 Table: Case Processing Summary
245 ,,N,%
246 Cases,Valid,131,92.91
247 ,Excluded,10,7.09
248 ,Total,141,100.00
249
250 Table: Reliability Statistics
251 Cronbach's Alpha,N of Items
252 .75,4
253 ])
254 AT_CLEANUP
255
256
257 dnl This was causing a AT.  
258 AT_SETUP([RELIABILITY bad syntax])
259 AT_DATA([bad-syntax.sps], [dnl
260 data list notable list /x * y *.
261 begin data.
262 1 10
263 2 20
264 3 30
265 4 50
266 5 50
267 end data.
268
269 * This syntax is incorrect
270 reliability x y.
271 ])
272
273 AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore])
274
275 AT_CLEANUP
276
277 dnl Checks for a crash when bad syntax followed scale specification.
278 AT_SETUP([RELIABILITY bad syntax 2])
279 AT_DATA([bad-syntax.sps], [dnl
280 new file.
281 data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *.
282 begin data.
283 end data.
284
285 * This syntax is incorrect
286 reliability variables=f01 to f10/asdfj.
287 ])
288 AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore])
289 AT_CLEANUP
290
291
292 dnl Checks for a crash when the active file was empty.  Bug #38660.
293 AT_SETUP([RELIABILITY crash with no data])
294 AT_DATA([reliability.sps], [dnl
295 new file.
296 data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *.
297 begin data.
298 end data.
299
300 reliability variables=f01 to f10.
301 ])
302 AT_CHECK([pspp -O format=csv reliability.sps], [0], [])
303 AT_CLEANUP
304
305
306
307
308 dnl This is an example from doc/tutorial.texi
309 dnl So if the results of this have to be changed in any way,
310 dnl make sure to update that file.
311 AT_SETUP([RELIABILITY tutorial example])
312 AT_DATA([tut-example.sps], [dnl
313 get file='hotel.sav'.
314
315 compute v3 = 6 - v3.
316 compute v5 = 6 - v5.
317
318 reliability variables = v1 v3 v4.
319 ])
320
321 AT_CHECK([ln -s $top_srcdir/examples/hotel.sav .], [0])
322 AT_CHECK([pspp -O format=csv tut-example.sps], [0], [dnl 
323 Scale: ANY
324
325 Table: Case Processing Summary
326 ,,N,%
327 Cases,Valid,17,100.00
328 ,Excluded,0,.00
329 ,Total,17,100.00
330
331 Table: Reliability Statistics
332 Cronbach's Alpha,N of Items
333 .81,3
334 ])
335
336 AT_CLEANUP