Thanks! However, what I mean is performing 31 regressions based on the combinations of the predictors. I don't consider interaction in this case. So, the regressions are like lm(y~x1+x2) or lm(Y~x1+x2+x3),or lm(y~x1+x2+x4) ...etc.
--- Patrick Connolly <[EMAIL PROTECTED]> wrote: > On Sun, 31-Aug-2003 at 06:06PM -0700, Lily wrote: > > |> Dear All, > |> > |> I would like to perform linear regressions based > on Y > |> and all of the combinations of the five > predictors, > |> > i.e.,(y,x1,x2),(y,x1,x3),....,(y,x1,x2,x4,x5),....,(y,x1,x2,x3,x4,x5). > |> > |> Is there any quick way to do it instead of repeat > |> performing regressions for 31 times? Or, is there > > |> any method to manipulate the dataset into the 31 > |> combinations? > > Probably, but it's simpler to put them all in the > formula: > > lm(y ~ x1 * x2 * x3 * x4 *x5) > > > -- > Patrick Connolly > HortResearch > Mt Albert > Auckland > New Zealand > Ph: +64-9 815 4200 x 7188 > ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ > I have the world`s largest collection of seashells. > I keep it on all > the beaches of the world ... Perhaps you`ve seen it. > ---Steven Wright > ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
