[R] Obtaining the surrogate splits from rpart

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Oct 30 20:51:59 CET 2001


On Tue, 30 Oct 2001, Clayton Springer wrote:

> Dear r-help,
>
> I am trying to obtain the surrogate splits from an rpart object
>
> The documentation for rpart.object mentions splits (a matrix
> with the surrogate splits in it).  But it does not seem to
> be quite right.

In what respect?

> Thanks in advance for your help,
>
> Clayton
>
> p.s. It would help my understanding,
> if you could give your answers using the built in "fit" example
> from rpart.
>
> > data(kyphosis)
> > fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)

summary.rpart prints them out for you, so just examine its R code
to see how to extract them.


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