/* potato2.sas */ /* Potato leafhopper survival example */ options ls=72 ps=60; data potato; infile 'potato.dat'; input treat $ time; /* get the standard one-way ANOVA table */ proc glm data=potato; class treat; model time = treat / ss1 ss2; /* fit the cell means model */ proc glm data=potato; class treat; model time = treat / noint solution clparm ss1 ss2; /* estimate the contrasts */ estimate 'fructose vs glucose' treat 0 1 -1 0 / e; estimate 'sucrose vs 6-carbons' treat 0 -1 -1 2 / divisor=2; estimate 'control vs sugars' treat 3 -1 -1 -1 / divisor=3; /* get the single degree of freedom sums of squares */ contrast 'fructose vs glucose' treat 0 1 -1 0; contrast 'sucrose vs 6-carbons' treat 0 -1 -1 2; contrast 'control vs sugars' treat 3 -1 -1 -1; /* get the among groups sums of squares */ contrast 'among' treat 0 1 -1 0, treat 0 -1 -1 2, treat 3 -1 -1 -1; /* estimate additional contrasts */ estimate 'control vs 6-carbons' treat 2 -1 -1 0 / divisor=2; estimate 'sucrose vs others' treat -1 -1 -1 3 / divisor=3; run;