[R] rpart: how to assign observations to nodes in regression trees

Diego Bellisai diego.bellisai at gmail.com
Mon Nov 30 16:21:46 CET 2009


Hi,
I am building a regression tree (method=anova) by using rpart package
and as a final result I get the final leaves characterized by
different means and standard deviations for the dependent variable.
However, differently from the classification tree for categorical
variables I cannot find a way to assign each observation to a leaf,
i.e. I can find no frame whcih contains the observation id coupled to
the leaf id. I also cannot found where the leaves id are stored.
Is there someone which can help me?
Regards, Diego.




More information about the R-help mailing list