[R] lm

Michael Roberts MROBERTS at ers.usda.gov
Mon Aug 20 23:35:52 CEST 2001


I have a question related to this one:

Is there a function that allows one to simultaneously estimate a 
variance-covariance matrix of the errors for a multiple linear
model?  It would be straightforward to do this in two steps,
estimating the covariance matrix using the residuals.  But is
there a canned function for a maximum likelihood estimates?

Thanks,
Mike Roberts


>>> Thomas Lumley <tlumley at u.washington.edu> 08/20 1:29 PM >>>
On Mon, 20 Aug 2001, Pesl Thomas wrote:

> By error I used the function lm with arrays. Is this a legal
action?
> funtion call:
> h.lm<-lm(h.0~h.9+h.8)
> where all of the variables are arrays of dimension 722,6,10
>

It's legal, but in this case won't have been what you wanted.

A matrix on the right-hand side of the formula means to use all the
columns of the matrix as predictors.  A matrix on the left-hand side
means
a multiple linear model: fitting each column separately as the
response
variable.

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html

Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To:
r-help-request at stat.math.ethz.ch

_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list