Data from Table 19.4, page 439.
NOTE: The data from Table 19.4 can be set up in two different formats, long and wide. In a long format, each row is defined by a single measurement and each subject will have multiple rows. Conversely, in a wide format, all of the subjects measurements will be recorded on one row. The mixed procedure can only handle the data in a long format whereas glm can handle either format. We’ll start of analyzing the data in a long format.
data list list/ s a b seeds. begin data. 1 1 1 13 1 1 2 14 1 1 3 17 1 1 4 20 2 1 1 10 2 1 2 11 2 1 3 15 2 1 4 14 3 1 1 13 3 1 2 19 3 1 3 18 3 1 4 22 4 1 1 4 4 1 2 12 4 1 3 14 4 1 4 16 5 2 1 5 5 2 2 13 5 2 3 21 5 2 4 24 6 2 1 8 6 2 2 18 6 2 3 25 6 2 4 27 7 2 1 14 7 2 2 19 7 2 3 26 7 2 4 26 8 2 1 12 8 2 2 24 8 2 3 29 8 2 4 29 9 3 1 13 9 3 2 24 9 3 3 28 9 3 4 32 10 3 1 9 10 3 2 22 10 3 3 22 10 3 4 24 11 3 1 14 11 3 2 22 11 3 3 28 11 3 4 28 12 3 1 8 12 3 2 18 12 3 3 27 12 3 4 29 end data.
Table 19.4, page 439. Analysis of variance for a mixed (Ax(BxS)) design.
NOTE1: The parenthesis used in glm () denote nesting. In this example, subjects are nested within Factor A.
NOTE2: The program for glm on the narrow data set is much more complicated than either mixed or the glm on the wide formatted data set.
glm seeds by a b s /design a s(a) b a*b b*s(a) /test a vs s(a) /test b vs b*s(a) /test a*b vs b*s(a).
Custom Hypothesis Tests #1
Custom Hypothesis Tests #2
Custom Hypothesis Tests #3
mixed seeds by a b /print = solution /fixed = intercept a b a*b /repeated = a b | subject(s) covtype(cs).
Fixed Effects
Covariance Parameters
Data from table 19.4 in a wide format.
data list list / s a b1 b2 b3 b4. begin data. 1 1 13 14 17 20 2 1 10 11 15 14 3 1 13 19 18 22 4 1 4 12 14 16 5 2 5 13 21 24 6 2 8 18 25 27 7 2 14 19 26 26 8 2 12 24 29 29 9 3 13 24 28 32 10 3 9 22 22 24 11 3 14 22 28 28 12 3 8 18 27 29 end data. glm b1 b2 b3 b4 by a /wsfactor = b 4.
Table 19.6, page 445. Tests from the multivariate analysis of Table 19.4.
See output from Table 19.4, page 439 for multivariate analysis (using wide data format).