# NOT RUN {
##-----------------------------------------------------------------
## VIMP plot for multivariate longitudinal response
##-----------------------------------------------------------------
# Simulate data involves 3 response and 4 covariates
dta <- simLong(n = 100, ntest = 100 ,N = 5, rho =.80, model = 1, q_x = 0,
q_y = 0,type = "corCompSym")
dtaL <- dta$dtaL
trn <- dta$trn
# Boosting call: Raw values of covariates, B-spline for time,
# no shrinkage, no estimate of rho and phi
boost.grow <- BoostMLR(x = dtaL$features[trn,], tm = dtaL$time[trn],
id = dtaL$id[trn], y = dtaL$y[trn,], M = 100, VarFlag = FALSE)
boost.pred <- predictBoostMLR(Object = boost.grow, x = dtaL$features[-trn,],
tm = dtaL$time[-trn], id = dtaL$id[-trn],
y = dtaL$y[-trn,], importance = TRUE)
# Plot VIMP
plotVIMP(vimp_Object = boost.pred$vimp,ymaxlim = 20,plot.it = FALSE)
# }
Run the code above in your browser using DataLab