" Exercise 2.1 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, 16/09/2014 " " Set working directory - change to location of your data file " \SET [WORKINGDIRECTORY='d:/stats4biol/data/'] " Read data from working directory " FILEREAD [NAME='GRASS.DAT'; IMETHOD=read] FGROUPS=no " Bar chart " " Set up factor with all possible numbers of plants per quadrat & assign counts as factor values " FACTOR [LEVELS=!(0,1,2...15); VALUES=#Count] IDENTIFIER=fCount " Get frequency table of counts " TABULATE [CLASSIFICATION=fCount; COUNTS=Freq] PRINT Freq " Set up axis labels " YAXIS WINDOW=1; TITLE='Number of quadrats' XAXIS WINDOW=1; TITLE='Number of plants' " Plot bar chart" BARCHART [KEY=0] DATA=Freq; PEN=1 " Sample statistics " DESCRIBE [SELECTION=mean,median,q1,q3] DATA=Count " Box plot with mean added as reference level " CALCULATE Mean=MEAN(Count) BOXPLOT [AXISTITLE='Number of plants'; REFERENCELINE=Mean] DATA=Count " End of File "