Data from Table 15.3, page 320.
data list list / a x y. begin data. 1 11 9 1 6 1 1 5 2 1 8 3 1 9 5 1 4 2 1 9 4 1 12 6 2 3 2 2 7 3 2 11 7 2 9 12 2 5 5 2 10 9 2 7 6 2 4 4 end data.
ANOVA table for Y from Table 15.3, page 320.
glm y by a.
Analysis of Covariance: Equation (15.12), page 321 and Table 15.4, page 324
glm y by a with x /print = parameters.
Data from Table 15.5, page 327.
data list list / a x y. begin data. 1 11 9 1 6 1 1 5 2 1 8 3 1 9 5 1 4 2 1 9 4 1 12 6 2 3 2 2 7 3 2 11 7 2 9 12 2 5 5 2 10 9 2 7 6 2 4 4 3 3 2 3 8 8 3 7 5 3 10 8 3 4 3 3 5 4 3 9 6 3 5 4 end data.
Contrasts on adjusted means, middle of page 327
glm y by a with x /lmatrix = 'a1 vs (a2 and a3)' a 1 -.5 -.5 /lmatrix = 'a2 vs a3' a 0 -1 1.
Custom Hypothesis Tests #1
Custom Hypothesis Tests #2
Data from Table 15.6, page 329.
data list list / a b x y. begin data. 1 1 2 11 1 1 1 8 1 1 5 8 1 1 4 7 1 2 5 10 1 2 5 8 1 2 1 10 1 2 3 11 2 1 2 12 2 1 3 7 2 1 4 6 2 1 1 11 2 2 4 15 2 2 5 12 2 2 3 16 2 2 4 13 end data.
Table 15.6, page 329. Analysis of Covariance and adjusted means in a two-factor design
glm y by a b with x /emmeans = tables(a*b).
Estimated Marginal Means
Data from Table 15.7, page 331.
data list list / a x y. begin data. 1 2 5 1 2 4 1 3 6 1 4 4 1 4 7 1 6 3 1 7 5 1 8 6 1 8 3 1 9 3 1 10 2 1 11 4 2 3 2 2 5 2 2 5 4 2 6 4 2 6 6 2 8 4 2 9 6 2 9 8 2 10 7 2 11 5 2 12 7 2 13 10 end data.
Table 15.7, page 331. Analysis of Covariance testing for differences in slope
NOTE: If the a*x interaction is significant, the assumption of homogeneity of the regression line has been violated
glm y by a with x /design = a x a*x.
Data from Table 15.8, page 334.
data list list / a x xquad y. begin data. 1 1 49 7 1 3 25 5 1 3 25 7 1 4 16 4 1 5 9 3 1 5 9 5 1 7 1 3 1 9 1 4 1 10 4 6 1 11 9 5 1 12 16 8 1 13 25 7 2 3 25 10 2 4 16 9 2 4 16 8 2 6 4 9 2 7 1 5 2 8 0 7 2 9 1 6 2 10 4 5 2 11 9 9 2 13 25 9 2 14 36 8 2 14 36 10 end data.
Table 15.8, page 334. Analysis of Covariance testing for curvature
NOTE: The xquad term is mean centered to reduce the correlation with x
glm y by a with x xquad.
Data from Table 15.9, page 338.
data list list / a x y. begin data. 1 62 3 1 63 4 1 63 5 1 64 5 1 64 6 1 65 5 1 66 4 1 66 7 1 67 6 1 67 8 1 68 7 1 69 9 2 68 5 2 70 7 2 71 6 2 72 8 2 72 9 2 73 7 2 73 8 2 74 9 2 75 11 2 76 10 2 77 9 2 77 11 end data.
Table 15.9, page 338. Analysis of variance and covariance.
glm y by a.
glm y by a with x.