[R] What is wrong with this contrast matrix?

Christoph Scherber Christoph.Scherber at agr.uni-goettingen.de
Thu Jul 24 17:30:57 CEST 2008


Dear all,

I am fitting a multivariate linear model with 7 response variables and 1 explanatory variable.

The following matrix P:

P <- cbind(
c(1,-1,0,0,0,0,0),
c(2,2,2,2,2,-5,-5),
c(1,0,0,-1,0,0,0),
c(-2,-2,0,-2,2,2,2),
c(-2,1,0,1,0,0,0),
c(0,-1,0,1,0,0,0))

should consist of orthogonal elements (as can be shown using %*% on the individual columns).

However, when I use

linhyp=linear.hypothesis(model, "explanatory.variable", P=P)

I get an error saying

Error in linear.hypothesis.mlm(mult1, "logdiv", P = P) :
The error SSP matrix is apparently of deficient rank = 4 < 6

Which I interpret as there are too many non-zero rows in the matrix, P.

Is that correct? And how can I assess if the matrix is orthogonal (given that it is non-symmetrical, 
hence det(P) and other matrix operations won?t work)

Many thanks for your help!

Best wishes
Christoph.


(using R 2.7.1 on Windows XP)


-- 
Dr. rer.nat. Christoph Scherber
University of Goettingen
DNPW, Agroecology
Waldweg 26
D-37073 Goettingen
Germany

phone +49 (0)551 39 8807
fax   +49 (0)551 39 8806

Homepage http://www.gwdg.de/~cscherb1



More information about the R-help mailing list