stabilise {stabiliser} | R Documentation |
stabilise
Description
Function to calculate stability of variables' association with an outcome for a given model over a number of bootstrap repeats
Arguments
data |
A dataframe containing an outcome variable to be permuted. |
outcome |
The outcome as a string (i.e. "y"). |
boot_reps |
The number of bootstrap samples. Default is "auto" which selects number based on dataframe size. |
permutations |
The number of times to be permuted per repeat. Default is "auto" which selects number based on dataframe size. |
perm_boot_reps |
The number of times to repeat each set of permutations. Default is 20. |
models |
The models to select for stabilising. Default is elastic net (models = c("enet")), other available models include "lasso", "mbic", "mcp". |
type |
The type of model, either "linear" or "logistic" |
quantile |
The quantile of null stabilities to use as a threshold. |
normalise |
Normalise numeric variables (TRUE/FALSE) |
dummy |
Create dummy variables for factors/characters (TRUE/FALSE) |
impute |
Impute missing data (TRUE/FALSE) |
Value
A list for each model selected. Each list contains a dataframe of variable stabilities, a numeric permutation threshold, and a dataframe of coefficients for both bootstrap and permutation.