Skip to contents

Identifies independent variables that are selected by the Bolasso algorithm at least the fraction of the time specified by the user-defined threshold. The typical value for this threshold is 0.9 and typically shouldn't be lower than that.

Usage

selected_vars(object, threshold = 0.9, summarise = TRUE, ...)

Arguments

object

An object of class bolasso.

threshold

A numeric between 0 and 1, specifying the fraction of bootstrap replicates for which Lasso must select a variable for it to be considered a selected variable.

summarise

A Boolean indicator where FALSE indicates returning the full set of coefficients at the selected variable/bootstrap replicate level and TRUE indicates taking the average of each variable's coefficient across bootstrap replicates. The default value is TRUE as it's more efficient and interpretable.

...

Additional arguments to pass to predict on objects with class cv.glmnet or cv.gamlr.

Value

A tibble with each selected variable and its respective coefficient for each bootstrap replicate.

See also

glmnet::predict.glmnet() and gamlr:::predict.gamlr for details on additional arguments to pass to ....