Re: [R] Backward elimination in regression

2011-03-22 Thread Eik Vettorazzi
Hi Denis, how about this: to.drop<-"x1" update(mod,as.formula(paste(".~.-",to.drop,sep=""))) hth. Am 22.03.2011 08:12, schrieb denis.ay...@unibas.ch: > Dear all > > I want to run a simple multiple linear regression model, say: > > mod <- lm(y~x1+x2+x3+x4) > > I have programmed a custom algori

[R] Backward elimination in regression

2011-03-22 Thread Denis . Aydin
Dear all I want to run a simple multiple linear regression model, say: mod <- lm(y~x1+x2+x3+x4) I have programmed a custom algorithm to calculate the p-values, because there is clustering present. I ordered the variables according to their p-value and want to stepwise eliminate the variables