coef.hierbasis <- function(mod, lam.idx = NULL) {
if (is.null(lam.idx)) {
lam.idx <- 1:length(mod$lambdas)
}
coef.out <- as.matrix(rbind(mod$intercept, mod$beta)[,lam.idx])
rownames(coef.out) <- c("Intercept", paste0("PSI.", 1:mod$nbasis))
colnames(coef.out) <- paste0("lam.", lam.idx)
coef.out
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.