Learn R Programming

itree (version 0.1)

rsq.itree: 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. Same as rsq.rpart but does some checking to make sure warnings/error is printed when the user attempts to call the function in cases where either cptable=NULL or does not have the correct meaning to make the plots useful. Identical to the rpart function.

Usage

rsq.itree(x)

Arguments

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

Side Effects

Two plots are produced.

Examples

Run this code
#rpart's example:
z.auto <- itree(Mileage ~ Weight, car.test.frame)
rsq.itree(z.auto)

Run the code above in your browser using DataLab