I think under the default parameterization (REF, with the reference level being the last level), your code looks right. It excludes the last level. However, that may not be what you want or need. What values does rumol5A take on? You may need to change the parameterization to get what you want. I know if you used: class rumol5A/order=internal param=GLM; then the correct contrast would be: contrast 'Linear effect' rumol5A -5 -3 -1 1 3 5 /e; as the GLM parameterization requires all levels to be included. As far as the coefficients, they provide a linear only contrast that has coefficients that sum to zero. To derive them, take the ordinal values of the levels, find their mean, subtract the mean from the ordinal value, and convert all to integers by multiplying each by an appropriate constant. Steve Denham
... View more