options formdlim = '-' ps = 55 ls = 78; /* these options makes SAS print a line of --- at the start of each new */ /* page instead of using a new page. They also set the page size to 55 */ /* lines with 78 spaces in a line */ data food; infile 'food.txt'; input product $ taste; if taste ne .; /* one (of many ways) to get rid of the header */ proc glm; class product; model taste = product /clparm; lsmeans product /stderr cl; estimate 'H average vs C' product -1 0.5 0.5; estimate 'H average vs C (#2)' product -2 1 1 /divisor = 2; estimate 'L vs S' product 0 1 -1; contrast 'H average vs C' product -1 0.5 0.5; contrast 'H average vs C (#2)' product -2 1 1; contrast 'L vs S' product 0 1 -1; contrast '2 d.f. ' product -2 1 1, product 0 1 -1; output out = resids r = resid p = yhat; /* previous output command and this proc plot produce a residual plot */ proc plot; plot resid*yhat; run;