[R] R analogue

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon Jan 20 14:21:03 CET 2003


On Mon, 20 Jan 2003, Vumani Dlamini wrote:

> Is there any R analogue for the S+ function "na.gam.replace". 

No, for it is tailored for use by S's gam.

Some of the things it does are positively undesirable!  It uses mean
imputation for continuous variables, but for factors it makes NA into
another level, which silently assumes that all missing values are similar
and that they are going to occur with sufficient frequency in the
training data (and they may not occur at all).

> I would like 
> to make an interaction of a categorical and smooth continuous covariate.

You can do that without na.gam.replace: there is an example in the MASS 
scripts for the low-birth-weight data.


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