Learn R Programming

rpart (version 4.1.19)

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.

Examples

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

Run the code above in your browser using DataLab