R/bootstrap_se.R
bootstrap_se.RdCompute bootstrap-based standard error estimates for variable importance
bootstrap_se(
Y = NULL,
f1 = NULL,
f2 = NULL,
cluster_id = NULL,
clustered = FALSE,
type = "r_squared",
b = 1000,
boot_interval_type = "perc",
alpha = 0.05
)the outcome.
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.
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.
vector of the same length as Y giving the cluster IDs
used for the clustered bootstrap, if clustered is TRUE.
should the bootstrap resamples be performed on clusters
rather than individual observations? Defaults to FALSE.
the type of importance to compute; defaults to
r_squared, but other supported options are auc,
accuracy, deviance, and anova.
the number of bootstrap replicates (only used if bootstrap = TRUE
and sample_splitting = FALSE); defaults to 1000.
the type of bootstrap interval (one of "norm",
"basic", "stud", "perc", or "bca", as in
boot.ci) if requested. Defaults to "perc".
the level to compute the confidence interval at. Defaults to 0.05, corresponding to a 95% confidence interval.
a bootstrap-based standard error estimate