/* terplvlt.sas */ /* read spreadsheet file in tab-delimited form */ /* */ /* */ /* Siobhan O'Reilly's data on rosette bud mites */ /* levels of monoterpenes in Fraser firs */ /* */ data b ; /* tab delimited ******* */ infile 'terplvls.txt' dlm='09'x firstobs=2 ; /* *** Excel file */ input day $ location $1. infest $1. rep apinene bpinene limonene ; /* drop these obs */ if( apinene = . ) then delete ; if( day = '6/29/97' ) then delete ; * only one date ; /* denote plantations */ /* with cult=1 */ cult = 0 ; if( location = 'A' ) then cult = 1 ; if( location = 'N' ) then cult = 1 ; run ; /* print output */ proc print data=b ; title 'Monoterpene levels'; run; /* Statistical Analysis*/ /* */ proc glm data=b ; class cult location infest ; model apinene bpinene limonene = cult infest location(cult) ; lsmeans infest cult location(cult) / stderr tdiff pdiff ; run ;