[R] Missing value in Rpart

Prof Brian D Ripley ripley at stats.ox.ac.uk
Fri Aug 3 07:56:21 CEST 2001


On Thu, 2 Aug 2001, Shuguang Chen wrote:

> Our understanding of how classification trees in Rpart treat missing is
> that if the variable is ordinal(continous), Rpart, by default, imputes a
> value for missing.  How do we do the classification tree and tell Rpart not
> to impute.  That is, what command is used to turn off the imputation.

Not true.  Please do read the technical report (included in rpart_2.x).
Like CART (the book and the program), rpart uses surrogate splits.
To turn that off (why?) see ?rpart.control.

> Also, if we do get true missing, how does classification tree analysis in
> Rpart treat missing when the variable is ordinal (after we tell Rpart not
> to impute)?  I believe that when a variable is categorical, missing is
> treated as just another category.  But if the variable is ordinal, for

Not true.

> example, if the question is, how satsified are you with such and such, and
> the response goes on a 1-5 scale, is the missing treated as another 'value'
> on the scale, as a categorical response independent of the 1-5 scale, or as
> not part of the response at all, e.g., missing?

You seem to be confusing rpart with something else (it looks like with
trees in S).

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list