[R] stepwise on generlized linear model

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 17 11:03:18 CEST 2005


On Sun, 16 Oct 2005, Weijie Cai wrote:

> Can anybody give me a quick answer that whether step() can be directly
> applied to a glm model including both continuous variables and categorical
> variables (by factor())? Maybe my data is not suitable, I applied step() on
> my glm object and did not get any reduction (i.e., returned full model).

Yes, it can.  There are examples in e.g. MASS4.

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