[R] How to exclude insignificant intercepts using "step" function
Chris Friedl
cfriedalek at gmail.com
Wed Jun 24 01:09:36 CEST 2009
David Winsemius wrote:
>
>
> OK, this is on your head. Make sure you know how not to burn yourself
> with this:
>
> > model <- y ~ x1*x2 + one -1
> > data2$one <- 1
> > by(data2, data2$grp, function(x) step(lm(model, data=x)))
>
> Lets the intercept just be another variable.
>
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
>
Thanks for the solution and I do appreciate the warning. I will try not to
burn myself.
--
View this message in context: http://www.nabble.com/How-to-exclude-insignificant-intercepts-using-%22step%22-function-tp24158818p24176110.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list