bootStrap: Bootstrap procedure for variance estimation

View source: R/stage-2-functions.R

bootStrapR Documentation

Bootstrap procedure for variance estimation

Description

Bootstrap procedure for variance estimation

Usage

bootStrap(
  data,
  moments.ar,
  moreFeatures.v,
  B,
  method,
  method_wt.v,
  naturalGroupProp,
  num.random.b,
  gammaMin,
  gammaMax,
  seed,
  verbose,
  parallel = FALSE,
  n_cores = NULL,
  outcome_model = FALSE,
  crossfit_folds = NULL,
  nodesize = NULL
)

Arguments

data

Structured data list

moments.ar

Point estimate moments array

moreFeatures.v

Point estimate mean differences

B

Number of bootstrap samples

method

Weighting method ("IC", "IGO", or "FLEXOR")

method_wt.v

Original weights

naturalGroupProp

FLEXOR theta parameter

num.random.b

Number of random starts for FLEXOR in bootstrap

gammaMin

FLEXOR gamma lower bound

gammaMax

FLEXOR gamma uppper bound

seed

Random seed

verbose

Logical; if TRUE, display progress

parallel

Logical; if TRUE, use parallel processing (default: FALSE)

n_cores

Number of cores to use for parallel processing (default: availableCores() - 1)

outcome_model

Logical; if TRUE, uses RF-predicted Y in place of observed Y. Default FALSE.

crossfit_folds

Integer >= 2 enabling K-fold cross-fitting for the outcome model, or NULL to fit on the full bootstrap sample. Default is NULL.

nodesize

Integer nodesize for the propensity score random forests; reuses the value selected on the original data to skip re-tuning in each bootstrap iteration.

Value

List with three elements:

  • collatedMoments.ar - Array of bootstrap moments

  • collatedMoreFeatures.mt - Matrix of bootstrap mean differences

  • collatedESS - Vector of bootstrap ESS values


WMAP documentation built on Oct. 6, 2026, 1:07 a.m.