# NOT RUN {
##-----------------------------------------------------------------
## Calculate individual and joint VIMP
##-----------------------------------------------------------------
# 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 = FALSE)
# Individual VIMP
Ind_vimp <- vimp.BoostMLR(boost.pred)
# Joint VIMP
Joint_vimp <- vimp.BoostMLR(boost.pred,joint = TRUE)
# }
Run the code above in your browser using DataLab