[R] 3-way Interactions w/ stepAIC
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Jun 18 20:49:35 CEST 2003
On Wed, 18 Jun 2003 MZodet at ahrq.gov wrote:
> I'm attempting to use stepAIC to select a model through a forward procedure.
> I want to consider up to all 3-way interactions.
>
>
>
> I've attempted to use the following code:
>
>
>
> m2.Fwd3way <- stepAIC(m1.Ionly, direction="forward",
>
> scope=list(upper=~(var1 + var2 + var3 + var4)^3,
> lower=~1))
>
>
>
> When I submit this the trace indicates that only 2-way interactions were
> considered. Is this due to improper syntax or am I not able to consider
> higher order interactions with stepAIC.
Only if all the two-way ones have already been selected.
--
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
More information about the R-help
mailing list