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.gar...@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@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@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.

Reply via email to