/* Exercise 6.2 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 TRANSECT; infile 'C:\stats4biol\data\TRANSECT.DAT' firstobs=2 expandtabs; input DPlant Distance fDist Count; run; proc print data=TRANSECT;run; * Plot the data; axis1 label=('Number of Plants'); axis2 label=('Distance'); symbol value=dot interpool=none; proc gplot data=TRANSECT; plot Count*fDist/ vaxis=axis1 haxis=axis2; run; * One-way ANOVA of raw data with residual plots; proc glm data=TRANSECT plots=DIAGNOSTICS; class fDist; model Count = fDist; lsmeans fDist / stderr cl; run; * Transform data; data TRANSECT; set TRANSECT; logCount=log10(Count); run; * One way ANOVA of transformed data with residual plots; proc glm data=TRANSECT plots=DIAGNOSTICS; class fDist; model logCount=fDist; lsmeans fDist / stderr cl; ods output LSMeans=PREDMEANS; run; * Back-Transform treatment means; data PREDMEANS;set PREDMEANS; btmeans=10**LSMean; run; proc print data=PREDMEANS;run;