I wish to make a contrast matrix in the case of a linear model. I have one factor with three levels: T, N and A. I want the contrasts T vs N, T vs A and T vs (N and A combined). It is the last contrast with combined levels that cause troubles.

The "correct" result I can get by redefining N and A to a new combined level L and then make a one column contrast matrix T = 1, L = -1. But how to do it when this level is split into two?

The T = 2, N = -1, A = -1 column does not give the result of the above one col contrast.

I'm implementing it in R. The number of observations are T=30, N=14, A=15


1 Answer 1


If the correct result is obtained by T=1 and L=-1, then I would consider using T=1,N=-1,A=-1.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.