* Split plot data with CR whole plot design ; data split ; input person a b y @@ ; cards ; 1 1 1 3 1 1 2 4 1 1 3 7 1 1 4 7 2 1 1 6 2 1 2 5 2 1 3 8 2 1 4 8 3 1 1 3 3 1 2 4 3 1 3 7 3 1 4 9 4 1 1 3 4 1 2 3 4 1 3 6 4 1 4 8 5 2 1 1 5 2 2 2 5 2 3 5 5 2 4 10 6 2 1 2 6 2 2 3 6 2 3 6 6 2 4 10 7 2 1 2 7 2 2 4 7 2 3 5 7 2 4 9 8 2 1 2 8 2 2 3 8 2 3 6 8 2 4 11 ; proc print ; run ; proc glm ; class person a b ; model y = a person(a) b a*b ; random person(a) / test ; run ; /* Notice that the F tests agree between GLM and MIXED, but the standard errors of the means are different. Proc MIXED has correct standard errors */ * Below we use the STORE command to save information from Proc MIXED that is then processed by Proc PLM. Note that ODS graphics have to be set ON to obtain plots from Proc PLM ; ods graphics on ; proc mixed ; class person a b ; model y = a b a*b / ddfm = kr outp = rsplit ; random person(a) ; lsmeans a b / diff adjust = tukey ; lsmeans a b a*b ; lsmeans a*b / slice = b ; store mixresall ; run ; proc plm restore = mixresall; effectplot interaction(sliceby = b); effectplot interaction(sliceby = a); run; ods graphics off ; proc plot data = rsplit vpercent = 80 ; plot resid*pred ; run ; proc capability noprint data = rsplit lineprinter ; var resid ; qqplot resid /normal(mu = est sigma = est symbol='.') square ; run ;