# NOT RUN {
##-----------------------------------------------------------------
## 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 test set error
plotBoostMLR(boost.pred$Error_Rate,xlab = "m",ylab = "Test Set Error",
legend_fraction_x = 0.2)
# }
Run the code above in your browser using DataLab