An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111122/d1a091e3/attachment.pl>
help to setting a multiple (linear) regression model with a 5% significance level (threshold) for the inclusion of the model variables.
2 messages · gianni lavaredo, Brian Ripley
On 22/11/2011 16:30, gianni lavaredo wrote:
Dear Researchers, someone know the right syntax to chose a 5% signi???cance level (threshold) for the inclusion of the model variables in a multiple (linear) regression in backward way? I set the formula in this way, but I don't know to choose the 5% significance? lmodelV<- step(lm(formula=MyFormula[[1]],data=LR.train),direction="backward")
That is not what step() does. Please do read the help page!
Description:
Select a formula-based model by AIC.
Note, 'by AIC'.
Now, as Frank Harrell says here often, stepwise methods are inadmissible
for prediction, and in addition stepwise F-test methods are always
invalid as they ignore multiple testing. So you won't find such methods
prominently available in R (and all the stepwise methods I am aware of
in R packages use AIC or similar).
The author of step()
thanks in advance gianni [[alternative HTML version deleted]]
Please do not send HTML when expressly asked not to.
______________________________________________ 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.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595