9
$\begingroup$

From the ?rpart documentation -

na.action : the default action deletes all observations for which y is missing, but keeps those in which one or more predictors are missing.

How does it impute missing values in predictors?

$\endgroup$

1 Answer 1

5
$\begingroup$

This is where the surrogate variables come in - for each split, observations where the split variable is missing are split based on the best surrogate variable, if that's missing by the next best and so on, this is detailed in:

  • Therneau, Terry M. & Atkinson Elizabeth J. (March 28, 2014). An Introduction to Recursive Partitioning Using the RPART Routines, Mayo Foundation, section 5.

The document is accessible through rpart help (pdf).

$\endgroup$
2
  • 3
    $\begingroup$ I am struggling to understand this sentence: "or each split, observations where the split variable is missing are split based on the best surrogate variable". Observations where the split variable is missing are split? How is it possible to split a variable is missing? Also I am not sure about the definition of a split variable. $\endgroup$
    – par
    Jun 29, 2016 at 12:57
  • $\begingroup$ This by no means answers your question completely, but maybe my answer in a related question illustrates the idea better. The linked documentation in the above answer explains in detail how the surrogate split is calculated. stats.stackexchange.com/a/345033 $\endgroup$
    – Alex
    May 8, 2018 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.