[R] lm

Thomas Lumley tlumley at u.washington.edu
Mon Aug 20 19:29:03 CEST 2001


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list