options ls=75; data one; infile "drywt.dat" firstobs=2 dlm='09'x; input light temp i y; lt_combo=light+temp/10; /* light-temp combo */ run; proc print;run; proc glm; class lt_combo; model y=lt_combo; estimate "interaction" lt_combo -1 1 1 -1; /* diff of slopes, 1c */ contrast "interaction" lt_combo -1 1 1 -1; /* ss(interaction), 1d*/ contrast "ss(light)" lt_combo -1 -1 1 1; /* ss(light), 1d*/ contrast "ss(temp)" lt_combo -1 1 -1 1; /* ss(temp), 1d*/ proc glm; class light temp; *model y=light*temp; /* for one-way test of mu1=mu2=mu3=mu4 */ model y=light|temp; /* for two-factor analysis, 1e */ output out=plotme p=p; run; symbol value=dot i=join; proc gplot; title "interaction plot, problem 1g, hw4"; plot p*light=temp; run;