View source: R/VariableImportance.boot.R
VariableImportance.boot | R Documentation |
Performs a version of the parametric bootstrap to create an approximate null distribution for the modified variable importance values in order to get approximate p-values.
VariableImportance.boot(object, ...)
## S3 method for class 'BranchGLMVS'
VariableImportance.boot(
object,
nboot = 100,
parallel = FALSE,
nthreads = 8,
showprogress = TRUE,
...
)
## S3 method for class 'BranchGLMVI'
VariableImportance.boot(
object,
nboot = 100,
parallel = FALSE,
nthreads = 8,
showprogress = TRUE,
...
)
object |
a |
... |
further arguments to VariableImportance when |
nboot |
the number of bootstrap replications to perform. |
parallel |
a logical value to indicate if parallelization should be used. |
nthreads |
number of threads used with OpenMP, only used if |
showprogress |
a logical value to indicate if a progress bar should be displayed. |
This performs a version of the parametric bootstrap with the modified variable importance values to generate approximate p-values for the sets of variables. We are currently working on a paper that describes this function in further detail.
a BranchGLMVI.boot
object which is a list with the following components
summary |
a data.frame with the observed modified variable importance values and approximate p-values |
results |
a numeric matrix with the modified variable importance values for each set of bootstrap replications |
pvals |
a numeric vector with the approximate p-values based on modified variable importance |
nboot |
the number of bootstrap replications performed |
metric |
the metric used to calculate the modified variable importance values |
VI |
the supplied |
Seedorff J, Cavanaugh JE. Assessing Variable Importance for Best Subset Selection. Entropy. 2024; 26(9):801. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.3390/e26090801")}
hist.BranchGLMVI.boot, boxplot.BranchGLMVI.boot, VariableImportance
Data <- iris
Fit <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")
# Doing branch and bound selection
VS <- VariableSelection(Fit, type = "branch and bound", metric = "BIC",
showprogress = FALSE)
# Getting approximate null distributions
set.seed(40174)
myBoot <- VariableImportance.boot(VS, showprogress = FALSE)
myBoot
# Plotting histogram of results for second set of variables
hist(myBoot, which = 2)
# Plotting boxplots of results
oldmar <- par("mar")
par(mar = c(4, 6, 3, 1) + 0.1)
boxplot(myBoot, las = 1)
par(mar = oldmar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.