Re: [R] Calculating Rsquared values in rpart

From: Dylan Beaudette <dylan.beaudette_at_gmail.com>
Date: Thu, 13 Dec 2007 14:50:58 -0800

On Thursday 13 December 2007, Frank E Harrell Jr wrote:
> Andrew Park wrote:
> > 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
>
> Beware. Yi in his JASA paper about generalized degrees of freedom
> showed that to get an unbiased estimate of R^2 from recursive
> partitioning you have to use the formula for adjusted R^2 with number of
> parameters far exceeding the number of final splits. He showed how to
> estimate the d.f. Recursive partitioning seems to result in simple
> prediction models but this is mainly an illusion.
>
> Frank Harrell

Hi Frank and others,

hapen to have a link / citation for that paper?

thanks!

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341

______________________________________________
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.
Received on Thu 13 Dec 2007 - 22:47:41 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 14 Dec 2007 - 00:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.