人的 梦想,是不会结束的 ---- 马歇尔·D·帝奇
Polynomial Contrast in SAS and R
Calculation of Polynomial Contrast Coefficient is easy in equal spaced cases but not straigt forward in unequal sapced factors. They can be calculated using either SAS or R. SAS would need the SAS/IML package. R is free, but it gives the raw decimal point results. To make it integer, you have to normalize yourself.
Equal Spaced and Equal Sample Size
Three Methods
1. Check any ANOVA textbook
2. In SAS, use orpol() function in SAS/IML
3. In R/S-plus, use contr.poly()
Unequal Spaced
Two Methods
1. In SAS, use orpol() function in SAS/IML
2. In R/S-plus, use poly()
Polynomial Contrast in SAS and R