[R] modification of cross-validations in rpart

Terry Therneau therneau at mayo.edu
Tue Jul 5 15:18:44 CEST 2011

> Is there a way to do this modification in rpart or is there any other
> function I could use that would consider interdependence in the 
> response variable?

  This feature already exists: the "xval" option can be a vector of
integers that defines the "left out" groups.  First all the 1's are left
out, then the 2s, then the 3s, etc.

  Unfortunately this was overlooked in the documentation for
rpart.control; it's in the documentation for xpred.rpart though.  I'll
fix this soon as part of some other updates.

Terry Therneau

More information about the R-help mailing list