1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
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.
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.
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 AT_BANNER([RELIABILITY])
18 AT_SETUP([RELIABILITY])
19 AT_DATA([reliability.sps], [dnl
20 data list notable list /var1 *
35 6 7 7 5 7 7 7 7 7 7 6 6
36 6 7 7 6 7 6 7 5 6 5 7 7
37 6 6 7 6 5 3 6 4 5 6 4 5
38 4 6 5 6 6 5 4 3 5 6 5 6
39 5 6 5 5 6 5 4 4 6 6 5 5
40 6 6 7 6 6 5 6 5 6 6 5 6
41 5 6 6 5 6 5 5 4 6 5 5 5
42 5 7 7 7 7 7 6 5 7 7 7 7
43 6 6 6 5 5 7 6 5 6 6 5 6
44 . . . . . . . . . . . .
45 6 6 5 5 5 6 6 4 6 5 5 5
46 7 7 7 6 7 6 7 6 6 6 7 6
47 4 7 6 6 6 5 5 4 4 5 5 6
48 5 6 3 5 4 1 4 6 2 3 3 2
49 3 6 6 5 6 2 4 2 2 4 4 5
50 6 6 7 5 6 5 7 6 5 6 6 5
51 6 5 6 6 5 6 6 6 6 4 5 5
52 5 7 7 . 6 6 6 5 6 6 6 6
53 5 7 5 5 4 6 7 6 5 4 6 5
54 7 7 7 6 7 7 7 6 7 7 7 6
55 3 6 5 6 5 7 7 3 4 7 5 7
56 6 7 7 6 5 6 5 5 6 6 6 6
57 5 5 6 5 5 5 5 4 5 5 5 6
58 6 6 7 4 5 6 6 6 6 5 5 6
59 6 5 6 6 4 4 5 4 5 6 4 5
60 5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 5 4 6 6 5
141 5 5 6 4 6 5 7 6 5 5 5 6
142 . . . . . . . . . . . .
143 . . . . . . . . . . . .
144 5 7 7 5 6 6 7 7 6 6 6 7
145 6 7 7 1 2 1 7 7 5 5 5 2
146 . . . . . . . . . . . .
147 3 7 4 6 4 7 4 6 4 7 4 7
148 5 7 3 5 5 6 7 5 4 7 7 4
149 4 7 7 5 4 6 7 7 6 5 4 4
150 6 6 2 2 6 4 6 5 5 1 5 2
151 5 5 6 4 5 4 6 5 5 6 5 5
152 . . . . . . . . . . . .
153 5 7 6 6 6 6 6 6 5 6 6 6
154 6 6 6 5 6 6 6 6 7 5 6 7
155 3 6 3 3 5 3 3 5 3 5 7 4
156 4 4 6 3 3 3 4 3 4 2 3 6
157 5 7 7 6 5 4 7 5 7 7 3 7
158 4 5 4 4 4 4 3 3 3 4 3 3
159 6 7 7 5 6 6 7 5 4 5 5 5
160 3 5 3 3 1 3 4 3 4 7 6 7
161 4 5 4 4 4 3 4 5 6 6 4 5
162 5 6 3 4 5 3 5 3 4 5 6 4
163 5 5 5 6 6 6 6 4 5 6 6 5
164 6 7 7 2 2 6 7 7 7 7 5 7
165 5 7 7 4 6 5 7 5 5 5 6 6
166 6 6 7 7 5 5 5 7 6 7 7 7
167 6 5 7 3 6 5 6 5 5 6 5 4
168 5 7 6 5 6 6 6 5 6 5 5 6
169 4 5 5 5 6 3 5 3 3 6 5 5
170 . . . . . . . . . . . .
171 5 6 6 4 4 4 5 3 5 5 2 6
172 5 6 7 5 5 6 6 5 5 6 6 6
173 6 7 7 6 4 7 7 6 7 5 6 7
174 6 6 5 4 5 2 7 6 6 5 6 6
175 2 2 2 2 2 2 3 2 3 1 1 2
179 /VARIABLES=var2 var8 var15 var17 var6
180 /SCALE('Everything') var6 var8 var15 var17
184 /VARIABLES=var6 var8 var15 var17
185 /SCALE('Nothing') ALL
190 /VARIABLES=var2 var6 var8 var15 var17 var19
191 /SCALE('Totals') var6 var8 var15 var17
193 /STATISTICS = DESCRIPTIVES COVARIANCES
198 /VARIABLES=var6 var8 var15 var17
201 AT_CHECK([pspp -o pspp.csv reliability.sps], [0],
202 [reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced.
204 AT_CHECK([cat pspp.csv], [0], [dnl
207 Table: Case Processing Summary
209 Cases,Valid,131,92.91
213 Table: Reliability Statistics
214 Cronbach's Alpha,N of Items
219 Table: Case Processing Summary
221 Cases,Valid,131,92.91
225 Table: Reliability Statistics
226 Cronbach's Alpha,Part 1,Value,.55
231 Correlation Between Forms,,,.61
232 Spearman-Brown Coefficient,Equal Length,,.75
234 Guttman Split-Half Coefficient,,,.75
236 reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced.
240 Table: Case Processing Summary
242 Cases,Valid,131,92.91
246 Table: Reliability Statistics
247 Cronbach's Alpha,N of Items
250 Table: Item-Total Statistics
251 ,Scale Mean if Item Deleted,Scale Variance if Item Deleted,Corrected Item-Total Correlation,Cronbach's Alpha if Item Deleted
252 var6,15.97,8.43,.51,.71
253 var8,16.56,7.86,.53,.70
254 var15,16.47,8.45,.56,.68
255 var17,16.60,8.00,.57,.67
259 Table: Case Processing Summary
261 Cases,Valid,131,92.91
265 Table: Reliability Statistics
266 Cronbach's Alpha,N of Items
272 dnl This was causing a AT.
273 AT_SETUP([RELIABILITY bad syntax])
274 AT_DATA([bad-syntax.sps], [dnl
275 data list notable list /x * y *.
284 * This syntax is incorrect
288 AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore])
292 dnl Checks for a crash when bad syntax followed scale specification.
293 AT_SETUP([RELIABILITY bad syntax 2])
294 AT_DATA([bad-syntax.sps], [dnl
296 data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *.
300 * This syntax is incorrect
301 reliability variables=f01 to f10/asdfj.
303 AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore])
307 dnl Checks for a crash when the active file was empty. Bug #38660.
308 AT_SETUP([RELIABILITY crash with no data])
309 AT_DATA([reliability.sps], [dnl
311 data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *.
315 reliability variables=f01 to f10.
317 AT_CHECK([pspp -O format=csv reliability.sps], [0], [])
323 dnl This is an example from doc/tutorial.texi
324 dnl So if the results of this have to be changed in any way,
325 dnl make sure to update that file.
326 AT_SETUP([RELIABILITY tutorial example])
327 AT_DATA([tut-example.sps], [dnl
328 get file='hotel.sav'.
333 reliability variables = v1 v3 v4.
336 AT_CHECK([ln -s $top_srcdir/examples/hotel.sav .], [0])
337 AT_CHECK([pspp -O format=csv tut-example.sps], [0], [dnl
340 Table: Case Processing Summary
342 Cases,Valid,17,100.00
346 Table: Reliability Statistics
347 Cronbach's Alpha,N of Items