1 AT_BANNER([GLM procedure])
3 AT_SETUP([GLM latin square design])
5 dnl This example comes from :
6 dnl http://ssnds.uwo.ca/statsexamples/spssanova/latinsquareresults.html
7 AT_DATA([latin.sps], [dnl
9 data list notable fixed /a 1 b 3 c 5 y 7-10(2).
49 variable labels a 'Factor A' b 'Factor B' c 'Factor C' y 'Criterion'.
58 AT_CHECK([pspp -O format=csv latin.sps | sed 's/329.62[[678]]/329.62/'], [0],
60 warning: GLM is experimental. Do not rely on these results.
62 Table: Tests of Between-Subjects Effects
63 Source,Type III Sum of Squares,df,Mean Square,F,Sig.
64 Corrected Model,263.064,15,17.538,5.269,.000
65 Intercept,815.103,1,815.103,244.910,.000
66 Factor A,78.869,5,15.774,4.739,.005
67 Factor B,28.599,5,5.720,1.719,.176
68 Factor C,155.596,5,31.119,9.350,.000
69 Error,66.563,20,3.328,,
71 Corrected Total,329.62,35,,,
76 AT_SETUP([GLM 2 by 2 factorial design])
78 AT_DATA([2by2.sps], [dnl
80 data list notable list /Factor0 * Factor1 * points (F10).
104 glm points by Factor0 Factor1
111 AT_CHECK([pspp -O format=csv 2by2.sps ], [0],
113 warning: GLM is experimental. Do not rely on these results.
115 Table: Tests of Between-Subjects Effects
116 Source,Type III Sum of Squares,df,Mean Square,F,Sig.
117 Corrected Model,8667.053,3,2889.018,5.043,.012
118 Intercept,2256018.640,1,2256018.640,3937.693,.000
119 Factor0,313.394,1,313.394,.547,.470
120 Factor1,5157.508,1,5157.508,9.002,.008
121 Factor0 * Factor1,3196.150,1,3196.150,5.579,.031
122 Error,9166.865,16,572.929,,
123 Total,2273852.559,20,,,
124 Corrected Total,17833.918,19,,,
130 AT_SETUP([GLM Type I and II Sums of Squares])
132 dnl The following example comes from
133 dnl http://www.uvm.edu/~dhowell/StatPages/More_Stuff/Type1-3.pdf
134 AT_DATA([data-inc.sps], [dnl
137 data list notable list /dv * Agrp * B0 * B1 * B2 * i0 * i1 * i2 * sss *.
149 11 1 0 0 1 0 0 1 1.00
150 12 1 0 0 1 0 0 1 1.00
151 14 1 0 0 1 0 0 1 1.00
152 11 1 -1 -1 -1 -1 -1 -1 1.00
153 15 1 -1 -1 -1 -1 -1 -1 1.00
154 16 1 -1 -1 -1 -1 -1 -1 1.00
155 10 1 -1 -1 -1 -1 -1 -1 1.00
156 9 1 -1 -1 -1 -1 -1 -1 1.00
157 7 -1 1 0 0 -1 0 0 2.00
158 9 -1 1 0 0 -1 0 0 2.00
159 10 -1 1 0 0 -1 0 0 2.00
160 9 -1 1 0 0 -1 0 0 2.00
161 3 -1 0 1 0 0 -1 0 2.00
162 8 -1 0 1 0 0 -1 0 2.00
163 9 -1 0 1 0 0 -1 0 2.00
164 11 -1 0 1 0 0 -1 0 2.00
165 9 -1 0 0 1 0 0 -1 2.00
166 12 -1 0 0 1 0 0 -1 2.00
167 14 -1 0 0 1 0 0 -1 2.00
168 8 -1 0 0 1 0 0 -1 2.00
169 7 -1 0 0 1 0 0 -1 2.00
170 11 -1 -1 -1 -1 1 1 1 2.00
171 14 -1 -1 -1 -1 1 1 1 2.00
172 10 -1 -1 -1 -1 1 1 1 2.00
173 12 -1 -1 -1 -1 1 1 1 2.00
174 13 -1 -1 -1 -1 1 1 1 2.00
175 11 -1 -1 -1 -1 1 1 1 2.00
176 12 -1 -1 -1 -1 1 1 1 2.00
179 do if B0 = -1 AND B1 = -1 AND B2 = -1.
183 do if B0 = 0 AND B1 = 0 AND B2 = 1.
187 do if B0 = 0 AND B1 = 1 AND B2 = 0.
191 do if B0 = 1 AND B1 = 0 AND B2 = 0.
196 AT_DATA([type1.sps], [dnl
197 include 'data-inc.sps'.
205 /design Bgrp Agrp Bgrp * Agrp
210 AT_CHECK([pspp -O format=csv type1.sps], [0],
212 warning: GLM is experimental. Do not rely on these results.
214 Table: Tests of Between-Subjects Effects
215 Source,Type I Sum of Squares,df,Mean Square,F,Sig.
216 Corrected Model,216.017,7,30.860,5.046,.001
217 Intercept,3410.526,1,3410.526,557.709,.000
218 Agrp,9.579,1,9.579,1.566,.220
219 Bgrp,186.225,3,62.075,10.151,.000
220 Agrp * Bgrp,20.212,3,6.737,1.102,.364
221 Error,183.457,30,6.115,,
223 Corrected Total,399.474,37,,,
225 warning: GLM is experimental. Do not rely on these results.
227 Table: Tests of Between-Subjects Effects
228 Source,Type I Sum of Squares,df,Mean Square,F,Sig.
229 Corrected Model,216.017,7,30.860,5.046,.001
230 Intercept,3410.526,1,3410.526,557.709,.000
231 Bgrp,193.251,3,64.417,10.534,.000
232 Agrp,2.553,1,2.553,.418,.523
233 Bgrp * Agrp,20.212,3,6.737,1.102,.364
234 Error,183.457,30,6.115,,
236 Corrected Total,399.474,37,,,
240 AT_DATA([type2.sps], [dnl
241 include 'data-inc.sps'.
249 AT_CHECK([pspp -O format=csv type2.sps], [0],
251 warning: GLM is experimental. Do not rely on these results.
253 Table: Tests of Between-Subjects Effects
254 Source,Type II Sum of Squares,df,Mean Square,F,Sig.
255 Corrected Model,216.017,7,30.860,5.046,.001
256 Intercept,3410.526,1,3410.526,557.709,.000
257 Agrp,2.553,1,2.553,.418,.523
258 Bgrp,186.225,3,62.075,10.151,.000
259 Agrp * Bgrp,20.212,3,6.737,1.102,.364
260 Error,183.457,30,6.115,,
262 Corrected Total,399.474,37,,,
269 AT_SETUP([GLM excluded intercept])
271 dnl The following example comes from
273 dnl Rudolf N. Cardinal
274 dnl Graduate-level statistics for psychology and neuroscience
275 dnl ANOVA in practice, and complex ANOVA designs
276 dnl Version of 2 May 2004
278 dnl Downloaded from: http://egret.psychol.cam.ac.uk/psychology/graduate/Guide_to_ANOVA.pdf
280 AT_DATA([intercept-exclude.sps], [dnl
283 data list notable list /depvar * A *.
318 AT_CHECK([pspp -O format=csv intercept-exclude.sps], [0],
320 warning: GLM is experimental. Do not rely on these results.
322 Table: Tests of Between-Subjects Effects
323 Source,Type III Sum of Squares,df,Mean Square,F,Sig.
324 Model,1636.826,2,818.413,43.556,.000
325 A,1636.826,2,818.413,43.556,.000
326 Error,338.216,18,18.790,,
329 warning: GLM is experimental. Do not rely on these results.
331 Table: Tests of Between-Subjects Effects
332 Source,Type III Sum of Squares,df,Mean Square,F,Sig.
333 Corrected Model,98.568,1,98.568,5.246,.034
334 Intercept,1538.258,1,1538.258,81.867,.000
335 A,98.568,1,98.568,5.246,.034
336 Error,338.216,18,18.790,,
338 Corrected Total,436.784,19,,,