" 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 "
" Set working directory - change to location of your data file "
\SET [WORKINGDIRECTORY='d:/stats4biol/data/']
" Read data from working directory "
FILEREAD [NAME='TRANSECT.DAT'; IMETHOD=read] FGROUPS=2(no),yes,no
" Plot the data "
DGRAPH Y=Count; X=Distance
" One-way ANOVA of raw data "
TREATMENTSTRUCTURE fDist
ANOVA [FPROBABILITY=yes] Y=Count
" Residual plots "
APLOT [RMETHOD=standardized] METHOD=fittedvalues,normal,histogram,absresidual
" Transform data onto log10 scale "
CALCULATE logCount=LOG10(Count)
" One-way ANOVA of log-transformed data "
TREATMENTSTRUCTURE fDist
ANOVA [FPROBABILITY=yes] Y=logCount
" Residual plots "
APLOT [RMETHOD=standardized] METHOD=fittedvalues,normal,histogram,absresidual
" Look at predicted means on log scale with SED and LSD "
ADISPLAY [PRINT=means; PSE=differences,lsd]
" Extract treatment means and calculate & print back-transformations "
AKEEP TERMS=fDist; MEANS=means
PRINT STRUCTURE=10**means
" End of File "