if (FALSE) {
op <- par(no.readonly = TRUE)
data(GLESsmall)
## extract data and center covariates for better interpretability
Y <- GLESsmall$Y
X <- scale(GLESsmall$X, scale = FALSE)
Z1 <- scale(GLESsmall$Z1, scale = FALSE)
## vector of subtitles, containing the coding of the X covariates
subs.X <- c('', 'female (1); male (0)')
## Cross-validate BTLLasso model
m.gles.cv <- cv.BTLLasso(Y = Y, X = X, Z1 = Z1)
m.gles.cv
coef(m.gles.cv)
logLik(m.gles.cv)
head(predict(m.gles.cv, type="response"))
head(predict(m.gles.cv, type="trait"))
par(xpd = TRUE, mar = c(5,4,4,6))
plot(m.gles.cv, subs.X = subs.X, plots_per_page = 4, which = 2:5)
paths(m.gles.cv, y.axis = 'L2')
par(op)
}
Run the code above in your browser using DataLab