%let location=C:\Documents and Settings\woodph\My Documents\glmwood\kutnersolutions\Chapter15; PROC IMPORT OUT= WORK.teaching DATAFILE= "&location\chapter15.xls" DBMS=EXCEL REPLACE; SHEET="CH15FI01$"; GETNAMES=YES; MIXED=NO; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; RUN; proc print; Title "Teaching effectiveness example. Refer to page 645"; proc sort data=teaching out=teaching;by attend; proc capability data=teaching;by attend; var rating; histogram/normal; title "histograms via proc capability"; title2 "refer to 15.1 page 645";run; proc univariate data=teaching; var rating;class attend; histogram/normal; title "histograms via proc univariate"; title2 "refer to 15.1 page 645";run; proc gchart; vbar rating/ group=attend; title "histograms via gchart"; title2 "refer to 15.1 page 645";run; PROC IMPORT OUT= WORK.bread DATAFILE= "&location\chapter15.xls" DBMS=EXCEL REPLACE; SHEET="CH15FI06$"; GETNAMES=YES; MIXED=NO; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; RUN; proc print data=bread; title "summary statistics quick bread example. Refer to page 659";run; symbol1 v=dot c=black; /*Caution, you have to spell character values exactly as stored, or they won't be printed!*/ axis1 order=('Low' 'Medium' 'High' 'Very_High') offset=(.5 cm); proc gplot; plot volume*temp/haxis=axis1 ; title "mean plot of bread volume. Refer to Figure 15.6, page 659";run; PROC IMPORT OUT= WORK.BREADblk DATAFILE= "&location\chapter15.xls" DBMS=EXCEL REPLACE; SHEET="CH15FI09$"; GETNAMES=YES; MIXED=NO; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES;RUN; proc print; title "Blocked quick bread volume example. Refer to page 661";run; symbol1 i=join c=black v=dot; symbol2 i=join c=red v=circle; proc gplot; plot volume*temp=plant/haxis=axis1; title "Summary plot- Blocked quick bread volume example";run; PROC IMPORT OUT= WORK.skin DATAFILE= "&location\Chapter15.xls" DBMS=EXCEL REPLACE; SHEET="Table15#1$"; GETNAMES=YES; MIXED=NO; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; RUN; proc print data=skin; title "data listing Skin Sensitivity- Refer to Table 15.1, page 670";run; proc means data=skin; title "summary data- Skin Sensitivity. Refer to Table 15.1, page 679";run; data skin2;set skin; score=control;trt='Standard Allergen ';output; score=exper; trt='Experimental Allergen';output; symbol1 i=join repeat=20; axis1 order=('Standard Allergen' 'Experimental Allergen') offset=(.5 cm); proc gplot; plot score*trt=case/haxis=axis1; title "Summary plot- Allergen Sensivity example";run; data skin;set skin; proc means mean prt t lclm uclm alpha=.05;var diff; title "Test of differences between experimental and control via dependent t statistic";run; proc glm; model control exper=/nouni solution; repeated trt 2/mean summary; title "Test of differences between experiment & control via repeated measures test";run; data skin2;set skin; score=control;time=1;output; score=exper;time=2;output; proc print; title "reorganized data set";run; proc glm data=skin2;class case time; model score=case time/solution; means case time; title "Test of time and case via anova (interaction is implicit"; title2 "Refer to Figure 15.14, p. 671";run; proc glm;class time case; model score=time case time(case); manova h=time e=time(case); manova h=case e=time(case); title "test of differences of time and case via manova";run; proc glm;class time case; model score=time case/solution; means time case; title "Test of time and case via anova (interaction is implicit";run;