/* Exercise 6.3 Statistical Methods in Biology: Design and Analysis of Experiments and Regression by S.J. Welham, S.A. Gezan, S.J. Clark & A. Mead (2014) Chapman & Hall/CRC Press, Boca Raton, Florida. ISBN: 978-1-4398-0878-8 Version 1, 26/10/2014 */ ods graphics on; * Read data - change directory to location of your data file; data SCAB; infile 'C:\stats4biol\data\SCAB.DAT' firstobs=2 expandtabs; input Plot Row Col Treatment Sulphur Timing $ Scab; run; proc print data=SCAN;run; * One-way ANOVA of raw data with residual plots; proc glm data=SCAB plots=DIAGNOSTICS; class Treatment; model Scab=Treatment; lsmeans Treatment / stderr cl; run; * Transform data; data SCAB; set SCAB; logitP=log(Scab/(100-Scab)); run; * One way ANOVA of transformed data with residual plots; proc glm data=SCAB plots=DIAGNOSTICS; class Treatment; model logitP=Treatment; lsmeans Treatment / stderr cl; output out=RESID p=Pred r=SimpleRes student=StRes; ods output LSMeans=PREDMEANS; run; * Back-Transform treatment means; data PREDMEANS;set PREDMEANS; btmeans=100*exp(LSMean)/(1+exp(LSMean)); run; proc print data=PREDMEANS;run;