| selected_variables | R Documentation |
Identifies covariates that are selected by the Bolasso algorithm at the user-defined threshold. There are two variable selection criterion to choose between; Variable Inclusion Probability ("vip") introduced in the original Bolasso paper (Bach, 2008) and further developed by Bunea et al. (2011), and the Quantile ("qnt") approach proposed by Abram et al. (2016). The desired threshold value is 1 - alpha, where alpha is some (typically small) significance level.
selected_variables(
object,
threshold = 0.95,
method = c("vip", "qnt"),
var_names_only = FALSE,
...
)
object |
An object of class bolasso. |
threshold |
A numeric between 0 and 1, specifying the variable selection threshold to use. |
method |
The variable selection method to use. The two valid options
are |
var_names_only |
A boolean value. When |
... |
Additional arguments to pass to |
This function returns either a tibble::tibble of selected covariates and their corresponding coefficients across all bootstrap replicates, or a vector of selected covariate names.
A tibble with each selected variable and its respective coefficient for each bootstrap replicate OR a vector of the names of all selected variables. In the case of a multinomial regression this will return a list with one element for each unique outcome. Each element will then be either a tibble of coefficients or a list of names.
glmnet::coef.glmnet() and gamlr:::coef.gamlr for details
on additional arguments to pass to ....
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.