options ls=75 nodate; /*This experiment measures heights for 20 plants randomized to five treatments: trt=1: no light trt=2: source type A, intensity low trt=3: source type A, intensity high trt=4: source type B, intensity low trt=5: source type B, intensity high */ data plants1; /* data below available as "plantht1.dat";*/ input trt y; cards; 1 32.94 1 35.98 1 34.76 1 32.40 2 30.55 2 32.64 2 32.37 2 32.04 3 31.23 3 31.09 3 30.62 3 30.42 4 34.41 4 34.88 4 34.07 4 33.87 5 35.61 5 35.00 5 33.65 5 32.91 ; run; /* CLPARM option in MODEL statement will generate conf. limits for contrasts coded with ESTIMATE statements */ proc glm; class trt; model y=trt/solution clparm; estimate "intensity effect:hi-lo " trt 0 -1 1 -1 1/divisor=2; estimate "Rao12.6bi: type effect:A-B" trt 0 1 1 -1 -1/divisor=2; estimate "Rao12.6bii: intensityXtype interaction" trt 0 1 -1 -1 1; *estimate "control - mean(others)" trt ? ? ? ? ?/divisor=4; *contrast "intensity effect:hi-lo" trt 0 -1 1 -1 1; *contrast "type effect:A-B" trt 0 1 1 -1 -1; *contrast "intensityXtype interaction" trt 0 1 -1 -1 1; *contrast "control - mean(others)" trt ? ? ? ? ?; run; /* data below available as "plantht2.dat";*/ data plants2; input trt type intensity y; if (trt=1) then do; dark=1; intensity=0; type=0; end; else dark=0; cards; 1 0 0 32.94 1 0 0 35.98 1 0 0 34.76 1 0 0 32.40 2 1 1 30.55 2 1 1 32.64 2 1 1 32.37 2 1 1 32.04 3 1 2 31.23 3 1 2 31.09 3 1 2 30.62 3 1 2 30.42 4 2 1 34.41 4 2 1 34.88 4 2 1 34.07 4 2 1 33.87 5 2 2 35.61 5 2 2 35.00 5 2 2 33.65 5 2 2 32.91 ; run; proc print;run; proc glm; class dark type intensity; model y=dark type(dark) intensity(dark) type*intensity(dark); run;