plot.mvtb: Plots the model implied effect of 1 predictor for one outcome

Description Usage Arguments Details Value See Also

Description

Plots the model implied effect of 1 predictor for one outcome

Usage

1
2
3
## S3 method for class 'mvtb'
plot(x, predictor.no = 1, response.no = 1, n.trees = NULL,
  X = NULL, xlab = NULL, ylab = NULL, return.grid = FALSE, ...)

Arguments

x

mvtb output object

predictor.no

index of the predictor variable

response.no

index of the response variable

n.trees

desired number of trees. Defaults to the minimum number of trees by CV, test, or training error

X

optional vector, matrix, or data.frame of predictors. If included, a 'rug' (a small vertical line for each observation) is plotted on the x-axis showing the density of predictor.no.

xlab

label of the x axis

ylab

label of the y axis

return.grid

TRUE/FALSE return the prediction grid from gbm. Default is FALSE.

...

extra arguments are passed to plot. See ?par

Details

This is the classic partial dependence plot, where the model implied effect of the chosen predictor is plotted controlling for the other predictors. In addition to the model-implied effect, the relative influence of the predictor is included in the x-axis label. If this is not desired, a custom label can be provided via xlab.

Value

Produces a plot of the model implied effect along with the relative influence of the predictor. If return.grid=TRUE, returns the plotting matrix as well.

See Also

plot.gbm, mvtb.perspec, for other plots, mvtb.heat to plot the covariance explained by predictors in a heatmap


mvtboost documentation built on May 2, 2019, 2:14 p.m.