This document provides an example of using PROC GLM in SAS to perform a balanced ANOVA on stem length data from a randomized complete block experiment with seven plant types. The PROC GLM is used to fit a model with main effects for block and type. Contrast statements are included to test specific pairwise comparisons between types. Means for each type are also obtained.
8. Some statements
? CONTRAST祭Ρ鳩嵶
C CONTRAST ¨label¨ effect values <...effect values>
</ options> ;
C E.g. CONTRAST `A1B1 vs A2B2¨ A*B 1 0 0 -1;
? TEST砦原丼惚c餓恬Fz協
C TEST <H=effects> E=effect </ options> ;
C E.g. TEST h=A*B e=S*A*B;
? CONTRAST駅[壓MODEL岻瘁TEST、
MANOVA、REPEATED、RANDOM岻念
9. Some statements
? ESTIMATE差績亀直來M栽
C ESTIMATE ¨label¨ effect values <...effect values >
< / options > ;
C Z隈効CONTRAST匯咤孔嬬匆餓音謹
? RANDOM砦原陳乂頁 random effect
C RANDOM effects < / options > ;
C E.g. RANDOM A B;
10. Example: unbalanced
ANOVA
data exp;
input A $ B $ Y @@;
datalines;
A1 B1 12 A1 B1 14 A1 B2 11
A1 B2 9 A2 B1 20 A2 B1 18
A2 B2 17
;
proc glm data=exp;
class A B;
model Y=A B A*B;
run;