Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rsq.rpart

Plots the Approximate R-Square for the Different Splits


Description

Produces 2 plots. The first plots the r-square (apparent and apparent - from cross-validation) versus the number of splits. The second plots the Relative Error(cross-validation) +/- 1-SE from cross-validation versus the number of splits.

Usage

rsq.rpart(x)

Arguments

x

fitted model object of class "rpart". This is assumed to be the result of some function that produces an object with the same named components as that returned by the rpart function.

Side Effects

Two plots are produced.

Note

The labels are only appropriate for the "anova" method.

Examples

z.auto <- rpart(Mileage ~ Weight, car.test.frame)
rsq.rpart(z.auto)

rpart

Recursive Partitioning and Regression Trees

v4.1-15
GPL-2 | GPL-3
Authors
Terry Therneau [aut], Beth Atkinson [aut, cre], Brian Ripley [trl] (producer of the initial R port, maintainer 1999-2017)
Initial release
2019-04-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.