options ps=60; /*--------------------------------------------------- | SWABS.SAS : Data from survey on prevalence of | | upper respiratory tract infection | ---------------------------------------------------*/ data a; do crowd = 'OverC', 'Crowded','UnC'; do family = 1 to 6; do status = 'A','C'; do rep = 1,2; input positive@@; output; end; end; end; end; cards; 5 7 25 19 11 8 33 35 3 12 6 21 3 19 17 17 10 9 11 17 9 0 9 5 11 7 15 13 10 5 13 17 5 4 18 10 1 9 16 8 5 5 16 20 7 3 17 18 6 3 17 18 9 6 14 10 2 2 15 8 0 2 16 21 3 2 3 14 6 2 7 20 ; proc print; run; *proc glm; *class crowd family status; *model positive= crowd family(crowd) status; *random family(crowd)/test; *run; *glm would give you the expected mean squares for comparison with *your own computations ; proc mixed; class crowd family status; model positive = crowd status/s; *you might want to try also an interaction of crowd with status; random family(crowd); run;