[R] Different cp values in rpart() using plotcp() and printcp()

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Feb 17 19:03:36 CET 2012



On 17.02.2012 11:18, silje skår wrote:
> hi,
>
> I have a question regarding cp values in rpart(). When I use plotcp() I get
> a figure with cp values on the x-axsis, but then I use printcp() the cp
> values in that list are different from the values in the figure by
> plotcp(). Does someone know why?

printcp() gives the minimal cp for which the pruning happens.
plotcp() plots against the geometric mean (see the help pages!)

Uwe ligges



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