Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0305081031570.18661-100000@gannet.stats>
Date: 2003-05-08T09:34:50Z
From: Brian Ripley
Subject: Forward Stepwise regression with stepAIC and step
In-Reply-To: <3E7B8AA20004EF2B@mk-cpfrontend-4.mail.uk.tiscali.com>

On Thu, 8 May 2003 pfm401 at lineone.net wrote:

> I cannot seem to get the R functions step or stepAIC to perform forward
> or stepwise regression as I expect.

[...]

> wateruse.lm.forward<-stepAIC(wateruse.lm,trace=FALSE,direction="forward")

[...]

> In other words no forward procedure has been run (similar results apply
> if I use direction="step")!!

That's not a valid value for `direction': see the help page.

> What am I doing wrong?? Thanks in advance for any help.

You not given a `scope' argument, so there are no variables to add.

-- 
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