bootstrap_se: Compute bootstrap-based standard error estimates for variable...

View source: R/bootstrap_se.R

bootstrap_seR Documentation

Compute bootstrap-based standard error estimates for variable importance

Description

Compute bootstrap-based standard error estimates for variable importance

Usage

bootstrap_se(
  Y = NULL,
  f1 = NULL,
  f2 = NULL,
  type = "r_squared",
  b = 1000,
  boot_interval_type = "perc",
  alpha = 0.05
)

Arguments

Y

the outcome.

f1

the fitted values from a flexible estimation technique regressing Y on X. A vector of the same length as Y; if sample-splitting is desired, then the value of f1 at each position should be the result of predicting from a model trained without that observation.

f2

the fitted values from a flexible estimation technique regressing either (a) f1 or (b) Y on X withholding the columns in indx. A vector of the same length as Y; if sample-splitting is desired, then the value of f2 at each position should be the result of predicting from a model trained without that observation.

type

the type of importance to compute; defaults to r_squared, but other supported options are auc, accuracy, deviance, and anova.

b

the number of bootstrap replicates (only used if bootstrap = TRUE and sample_splitting = FALSE); defaults to 1000.

boot_interval_type

the type of bootstrap interval (one of "norm", "basic", "stud", "perc", or "bca", as in boot{boot.ci}) if requested. Defaults to "perc".

alpha

the level to compute the confidence interval at. Defaults to 0.05, corresponding to a 95% confidence interval.

Value

a bootstrap-based standard error estimate


bdwilliamson/npvi documentation built on Feb. 13, 2023, 9:58 a.m.