partial.BoostMLR {BoostMLR}R Documentation

Partial plot analysis

Description

Partial dependence plot of x and time against adjusted predicted y.

Usage

## S3 method for class 'BoostMLR'
partial(Object,
        xvar.name,
        n.x = 10,
        n.tm = 10,
        x.unq = NULL,
        tm.unq = NULL,
        Mopt,
        plot.it = TRUE,
        path_saveplot = NULL,
        Verbose = TRUE,
        ...)
        

Arguments

Object

A boosting object of class (BoostMLR, grow).

xvar.name

Name of the x-variable to be used for partial plot.

n.x

Maximum number of unique points used for xvar.name. Reduce this value if plotting is slow.

n.tm

Maximum number of unique points used for tm. Reduce this value if plotting is slow.

x.unq

Unique values used for the partial plot for variable xvar.name. Default is NULL in which case unique values are obtained uniformaly based on the range of variable.

tm.unq

Unique time points used for the partial plots of x against y. Default is NULL in which case unique values are obtained uniformaly based on the range of tm.

Mopt

The optimal number of boosting iteration. If missing, the value from the Object will be used.

plot.it

Should partial plot be displayed?

path_saveplot

Provide the location where plot should be saved. By default the plot will be saved at temporary folder.

Verbose

Display the path where the plot is saved?

...

Further arguments passed to or from other methods.

Details

Partial dependence plot (Friedman, 2001) of x values specified by xvar.name against the adjusted predicted y-values over a set of time points specified by tm.unq.

Value

x.unq

Unique values used for the partial plot for variable xvar.name

tm.unq

Unique time points used for the partial plots of x against y.

pList

List with number of elements equal to number of multivariate response. Each element of the list is a matrix with number of rows equal to length of x.unq, and number of columns equal to length of tm.unq. Values in the matrix represent predicted partial values.

sList

List with number of elements equal to number of multivariate response. Each element is a matrix with the same dimension as described in pList. Values are calculated using the local smoother (loess) for tm.unq and the i'th row of the matrix from pList. Users are encouraged to use pList to genenrate their own sList so that they will have more control over the different arguments of local smoother.

Author(s)

Amol Pande and Hemant Ishwaran

References

Friedman J.H. Greedy function approximation: a gradient boosting machine, Ann. of Statist., 5:1189-1232, 2001.

Examples


##------------------------------------------------------------
## Generate partial plot for covariate x1
##-------------------------------------------------------------

dta <- simLong(n = 100, N = 5, rho =.80, model = 1, q_x = 0, 
                                  q_y = 0,type = "corCompSym")$dtaL

# Boosting call: Raw values of covariates, B-spline for time, 
# no shrinkage, no estimate of rho and phi

boost.grow <- BoostMLR(x = dta$features, tm = dta$time, id = dta$id, 
                            y = dta$y, M = 100, VarFlag = FALSE)

Partial_Plot_x1 <- partial.BoostMLR(Object = boost.grow, xvar.name = "x1",plot.it = FALSE)



[Package BoostMLR version 1.0.3 Index]