[R] Calculating Rsquared values in rpart

Andrew Park anditopark at hotmail.com
Thu Dec 13 22:40:21 CET 2007


Hi there

In rpart, one can get a graph of R-squared (using rsq.rpart (fit)), in which the x axis is the number of splits, and which contains two lines - an "apparent" R squared and an Rsquared based on the x error.

I would like to caclulate these R-squared values, but cannot work out from the output how it is done. Is there any way to access the values that underpin this graph? Alternatively, is there any way to calculate them from the summary data?

Thanks in advance,

Andy Park









_________________________________________________________________
[[replacing trailing spam]]



More information about the R-help mailing list