[R] mvpart : Printing response values at terminal nodes

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Apr 27 11:28:56 CEST 2010

On 26.04.2010 19:33, S, Manjunath (GE, Research) wrote:
> I have created a multivariate regression tree using mvpart, with 3-4
> responses.  Though the plot shows bargraphs for each response, I would
> like to have the VALUES of the responses
> printed or indicated (via a scale or something) alongside the bargraph.
> Is this possible ??

Sure, save the result as in:

result <- mvpart(.....)

Then you get the leaf values by

result$frame$yval2[result$frame$var=="<leaf>", ]

and you can use them for printing, legends, or whatever you like.

Uwe Ligges

> Thanks,
> Manjunath
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list