#' Get coeficient names from a list of fitted models.
#'
#' @return list character vectors with coeficient names named with the name
#' of the variable selection (reduction) technique used.
#'
#' @param models list of model objects made by \code{get_fit_models}.
#' @export
get_coefs <- function(models) {
coefs <- list()
for (model_name in names(models)) {
fit <- models[[model_name]]
if (any(model_name %in% c("forward", "backward", "both")))
coefs[[model_name]] <- names(fit$model$coefficients)
else
coefs[[model_name]] <- get_glmnet_coef(fit)
}
coefs
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.