Learn R Programming

PPtreeregViz (version 2.0.5)

PPregVarViz: Visualize independent variable action in projection pursuit regression tree.

Description

This function is developed to see the influence of independent variables on the range of dependent variable.

Usage

PPregVarViz(PPTreeregOBJ,var.id,indiv=FALSE,
                   DEPTH=NULL,smoothMethod="auto", var.factor=FALSE)

Value

An object of the class ggplot

Arguments

PPTreeregOBJ

PPTreereg class object - a model to be explained

var.id

independent variable name

indiv

TRUE: individual group plot, FALSE: combined one plot

DEPTH

depth for exploration

smoothMethod

method in geom_smooth function

var.factor

TRUE when indepedent variable is a categorical variable (as factor)

Examples

Run this code
data(dataXY)
Model <- PPTreereg(Y~., data = dataXY, DEPTH = 2)
PPregVarViz(Model,"X1")
PPregVarViz(Model,"X1",indiv = TRUE)

Run the code above in your browser using DataLab