[R] what does it mean when "lm.gls" says that the weight matrix has wrong dimension?

From: Michael <comtech.usa_at_gmail.com>
Date: Wed 17 May 2006 - 14:55:55 EST


If first fit my data column V1 to column V2 using normal "lm" fitting,

call it "fit1",

then I used "acf(fit1$residuals, type='cov', 40) " function to obtain the autocovariance of the residuals,

and then constructed a autocovariance matrix, I chose it to be 40x40.

Call this autocovariance matrix B,

I then use the following "lm.gls" function to fit using the above weight matrix:

But what's wrong with my weight matrix?

> fit8=lm.gls(V1~V2, data=data1, W=B, inverse=TRUE);
Error in lm.gls(V1 ~ V2, data = data1, W = B, inverse = TRUE) :

        dim(W) is not correct

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed May 17 15:01:51 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 17 May 2006 - 18:10:10 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.