/************* mixed.sas ********************* Three levels of factor A, four levels of B Pretend both fixed Pretend both random Pretend A fixed, B random ***************************************************/ options linesize = 79; data mixedup; infile 'ch19pr14.dat'; input Y A garbage B; /* By default, both are considered fixed */ proc glm; class A B ; model y = a | b; /* Now both random */ proc glm; class A B ; model y = a | b; random a b a*b; /* Have to specify interaction random too! */ /* Are the printed F ratios correct now? */ proc glm; class A B ; model y = a | b; random a b a*b / test; /* Are the printed F ratios correct now? */ /* Now A fixed, B random */ proc glm; class A B ; model y = a | b; random b a*b / test;