Learn R Programming

PPtreeregViz (version 2.0.5)

plot.PPimportance: Variable importance plot of PPTreereg

Description

Visualize importance measure of trained PPTreereg model.

Usage

# S3 method for PPimportance
plot(x, marginal = FALSE, num_var = 5, ...)

Value

An object of the class ggplot

Arguments

x

an importance object of the class PPimpobj, created with PPimportance function

marginal

plot global importance. Default value is FALSE.

num_var

number of variables to show.

...

arguments to be passed to methods

Details

To visualize the variable importance values of PPTreereg model, two types of plots are provided - importance of variables for each final node and global variable importance.

Examples

Run this code
data(dataXY)
Model <- PPTreereg(Y~., data = dataXY, DEPTH = 2)
Tree.Imp <- PPimportance(Model)
plot(Tree.Imp)
plot(Tree.Imp, marginal = TRUE)

Run the code above in your browser using DataLab