Re: [R] multiple variables Y and X

From: Carlos Ortega <coforfe_at_gmail.com>
Date: Mon, 04 Apr 2011 11:23:47 +0200

Hello,

You can do that like in the example included in the function step()

lm1 <- lm(Fertility ~ ., data = swiss)

But my advise is that prior to doing that, you should check this old thread in this list:

http://tolstoy.newcastle.edu.au/R/e4/help/08/02/2842.html

Regards,
Carlos Ortega
www.qualityexcellence.es

On Mon, Apr 4, 2011 at 8:58 AM, Rosario Garcia Gil <M.Rosario.Garcia_at_slu.se>wrote:

> Hello
>
> I have a model with several hundred Y variables, and also several 1000 X
> variables. The model is linear lm(Y ~ X). My questions are:
>
> 1.- how to avoid writing all Xs variables? is list() the right function?
>
> 2.- about the multiple Ys with dependence among some of them, how to
> incorporate that information in the linear model?
>
> Thank you
>
> Rosario
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 04 Apr 2011 - 09:28:51 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 04 Apr 2011 - 09:40:27 GMT.

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

list of date sections of archive