options FORMDLIM="#"; /* This is a "Comment" in SAS */ /*************************************************************** Columns Description ------- ----------- 1- 2 Serial No. (1-25) within each group of 25 (the order in which data points were abstracted) 4 Number of companions (0, 1, or 8) 6 Type of companion 0: newly pregnant female 1: virgin female 9: not applicable (when PARTNERS=0) 8- 9 Lifespan, in days 11-14 Length of thorax, in mm (x.xx) 16-17 Percentage of each day spent sleeping **************************************************************/ /* Read in data from local drive */ data fruitfly; infile "My Documents\stat230\fruitfly3.txt"; input fly companions type lifespan thorax sleeppercent group $; run; /* OR */ /* Read in data from webpage (url) */ data fruitfly; infile "http://tofu.byu.edu/stat230/fruitfly3.txt" url; /* NOTE: if there was a header row on fruitfly3.txt, we could tell SAS to ignore the first line and find the first observation on row 2 by changing the infile statement to: infile "http://tofu.byu.edu/stat230/fruitfly3.txt" url firstobs=2; There is no header row here on fruitfly3.txt so the firstobs option is unnecessary, but there will be a header row on the cancer.txt file on your homework. */ input fly companions type lifespan thorax sleeppercent group $; run; proc print; run; proc glm data=fruitfly; class group; model lifespan = group; means group; /* This gives means for the levels of 'group'. If you wanted to get t tests for comparing each possible pair of group means, you could use: means group / t; */ run;