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/>.
17 AT_BANNER([RELIABILITY])
19 AT_SETUP([RELIABILITY])
20 AT_DATA([reliability.sps], [dnl
21 data list notable list /var1 *
36 6 7 7 5 7 7 7 7 7 7 6 6
37 6 7 7 6 7 6 7 5 6 5 7 7
38 6 6 7 6 5 3 6 4 5 6 4 5
39 4 6 5 6 6 5 4 3 5 6 5 6
40 5 6 5 5 6 5 4 4 6 6 5 5
41 6 6 7 6 6 5 6 5 6 6 5 6
42 5 6 6 5 6 5 5 4 6 5 5 5
43 5 7 7 7 7 7 6 5 7 7 7 7
44 6 6 6 5 5 7 6 5 6 6 5 6
45 . . . . . . . . . . . .
46 6 6 5 5 5 6 6 4 6 5 5 5
47 7 7 7 6 7 6 7 6 6 6 7 6
48 4 7 6 6 6 5 5 4 4 5 5 6
49 5 6 3 5 4 1 4 6 2 3 3 2
50 3 6 6 5 6 2 4 2 2 4 4 5
51 6 6 7 5 6 5 7 6 5 6 6 5
52 6 5 6 6 5 6 6 6 6 4 5 5
53 5 7 7 . 6 6 6 5 6 6 6 6
54 5 7 5 5 4 6 7 6 5 4 6 5
55 7 7 7 6 7 7 7 6 7 7 7 6
56 3 6 5 6 5 7 7 3 4 7 5 7
57 6 7 7 6 5 6 5 5 6 6 6 6
58 5 5 6 5 5 5 5 4 5 5 5 6
59 6 6 7 4 5 6 6 6 6 5 5 6
60 6 5 6 6 4 4 5 4 5 6 4 5
61 5 6 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4 6 6 5
142 5 5 6 4 6 5 7 6 5 5 5 6
143 . . . . . . . . . . . .
144 . . . . . . . . . . . .
145 5 7 7 5 6 6 7 7 6 6 6 7
146 6 7 7 1 2 1 7 7 5 5 5 2
147 . . . . . . . . . . . .
148 3 7 4 6 4 7 4 6 4 7 4 7
149 5 7 3 5 5 6 7 5 4 7 7 4
150 4 7 7 5 4 6 7 7 6 5 4 4
151 6 6 2 2 6 4 6 5 5 1 5 2
152 5 5 6 4 5 4 6 5 5 6 5 5
153 . . . . . . . . . . . .
154 5 7 6 6 6 6 6 6 5 6 6 6
155 6 6 6 5 6 6 6 6 7 5 6 7
156 3 6 3 3 5 3 3 5 3 5 7 4
157 4 4 6 3 3 3 4 3 4 2 3 6
158 5 7 7 6 5 4 7 5 7 7 3 7
159 4 5 4 4 4 4 3 3 3 4 3 3
160 6 7 7 5 6 6 7 5 4 5 5 5
161 3 5 3 3 1 3 4 3 4 7 6 7
162 4 5 4 4 4 3 4 5 6 6 4 5
163 5 6 3 4 5 3 5 3 4 5 6 4
164 5 5 5 6 6 6 6 4 5 6 6 5
165 6 7 7 2 2 6 7 7 7 7 5 7
166 5 7 7 4 6 5 7 5 5 5 6 6
167 6 6 7 7 5 5 5 7 6 7 7 7
168 6 5 7 3 6 5 6 5 5 6 5 4
169 5 7 6 5 6 6 6 5 6 5 5 6
170 4 5 5 5 6 3 5 3 3 6 5 5
171 . . . . . . . . . . . .
172 5 6 6 4 4 4 5 3 5 5 2 6
173 5 6 7 5 5 6 6 5 5 6 6 6
174 6 7 7 6 4 7 7 6 7 5 6 7
175 6 6 5 4 5 2 7 6 6 5 6 6
176 2 2 2 2 2 2 3 2 3 1 1 2
180 /VARIABLES=var2 var8 var15 var17 var6
181 /SCALE('Everything') var6 var8 var15 var17
185 /VARIABLES=var6 var8 var15 var17
186 /SCALE('Nothing') ALL
191 /VARIABLES=var2 var6 var8 var15 var17 var19
192 /SCALE('Totals') var6 var8 var15 var17
194 /STATISTICS = DESCRIPTIVES COVARIANCES
199 /VARIABLES=var6 var8 var15 var17
202 AT_CHECK([pspp -o pspp.csv -o pspp.txt reliability.sps], [0], [dnl
203 reliability.sps:174.4-174.40: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced.
204 174 | /STATISTICS = DESCRIPTIVES COVARIANCES
205 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
207 AT_CHECK([cat pspp.csv], [0], [dnl
210 Table: Case Processing Summary
216 Table: Reliability Statistics
217 Cronbach's Alpha,N of Items
222 Table: Case Processing Summary
228 Table: Reliability Statistics
229 Cronbach's Alpha,Part 1,Value,.55
234 Correlation Between Forms,,,.61
235 Spearman-Brown Coefficient,Equal Length,,.75
237 Guttman Split-Half Coefficient,,,.75
239 "reliability.sps:174.4-174.40: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced.
240 174 | /STATISTICS = DESCRIPTIVES COVARIANCES
241 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
245 Table: Case Processing Summary
251 Table: Reliability Statistics
252 Cronbach's Alpha,N of Items
255 Table: Item-Total Statistics
256 ,Scale Mean if Item Deleted,Scale Variance if Item Deleted,Corrected Item-Total Correlation,Cronbach's Alpha if Item Deleted
257 var6,15.97,8.43,.51,.71
258 var8,16.56,7.86,.53,.70
259 var15,16.47,8.45,.56,.68
260 var17,16.60,8.00,.57,.67
264 Table: Case Processing Summary
270 Table: Reliability Statistics
271 Cronbach's Alpha,N of Items
277 dnl This was causing a AT.
278 AT_SETUP([RELIABILITY bad syntax])
279 AT_DATA([bad-syntax.sps], [dnl
280 data list notable list /x * y *.
289 * This syntax is incorrect
293 AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore])
297 dnl Checks for a crash when bad syntax followed scale specification.
298 AT_SETUP([RELIABILITY bad syntax 2])
299 AT_DATA([bad-syntax.sps], [dnl
301 data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *.
305 * This syntax is incorrect
306 reliability variables=f01 to f10/asdfj.
308 AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore])
312 dnl Checks for a crash when the active file was empty. Bug #38660.
313 AT_SETUP([RELIABILITY crash with no data])
314 AT_DATA([reliability.sps], [dnl
316 data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *.
320 reliability variables=f01 to f10.
322 AT_CHECK([pspp -O format=csv reliability.sps], [0], [])
328 dnl This is an example from doc/tutorial.texi
329 dnl So if the results of this have to be changed in any way,
330 dnl make sure to update that file.
331 AT_SETUP([RELIABILITY tutorial example])
332 AT_DATA([tut-example.sps], [dnl
333 get file='hotel.sav'.
338 reliability variables = v1 v3 v4.
341 AT_CHECK([ln -s $top_srcdir/examples/hotel.sav .], [0])
342 AT_CHECK([pspp -o pspp.csv -o pspp.txt tut-example.sps])
343 AT_CHECK([cat pspp.csv], [0], [dnl
346 Table: Case Processing Summary
352 Table: Reliability Statistics
353 Cronbach's Alpha,N of Items