VariableImportance.boot: Performs Parametric Bootstrap for Modified Variable...

View source: R/VariableImportance.boot.R

VariableImportance.bootR Documentation

Performs Parametric Bootstrap for Modified Variable Importance

Description

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.

Usage

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,
  ...
)

Arguments

object

a BranchGLMVS or BranchGLMVI object.

...

further arguments to VariableImportance when object is of class BranchGLMVS.

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 parallel = TRUE.

showprogress

a logical value to indicate if a progress bar should be displayed.

Details

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.

Value

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 BranchGLMVI object

References

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")}

See Also

hist.BranchGLMVI.boot, boxplot.BranchGLMVI.boot, VariableImportance

Examples

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)


BranchGLM documentation built on Sept. 28, 2024, 9:07 a.m.