* Sample SAS program ; * Data set is from Dean and Voss (1999) Design and Analysis of ; * Experiments. Problem 3, page 129.; OPTIONS LINESIZE=75 NOCENTER NONUMBER NODATE; PROC FORMAT; VALUE brand 1 = 'Brand 1' 2 = 'Brand 2' 3 = 'Brand 3' 4 = 'Butter'; DATA margarine; INFILE 'C:\Documents and Settings\Mark Irwin\My Documents\Harvard\Courses\Stat 135\Autumn 2005\SAS\margarine.dat'; INPUT brand time; FORMAT brand brand. ; invtime = 1/time; * print the data to see if everything is ok ; PROC PRINT DATA=margarine; TITLE 'Margarine Experiment'; VAR brand time invtime; RUN; * Run the ANOVA ; PROC ANOVA; CLASS brand; /* declare brand to be a factor */ MODEL invtime = brand; MEANS brand; MEANS brand / dunnett('Butter'); RUN; * Switch from data file temp to data file resids ; QUIT; /* Ends the program */