Skip to contents

Abstract class for bootstrap-based inference.

The default m = NULL rule is a cheap deterministic intermediate sequence: \(m \to \infty\) and \(m / n \to 0\), as required by the standard m-out-of-n bootstrap asymptotic setup (Bickel, Gotze, and van Zwet; Bickel and Sakov). The exponent 0.7 is a pragmatic interior point in \((0, 1)\); it is not a silver-bullet optimal choice. Use select_optimal_m_out_of_n_bootstrap() for data-adaptive minimum-volatility selection.

The default m = NULL follows the intermediate-sequence convention from the m-out-of-n bootstrap literature: \(m \to \infty\) and \(m / n \to 0\). The deterministic exponent 0.7 is a first-pass default; for unstable paths prefer the minimum-volatility selector.

The NULL default is grounded in the standard m-out-of-n asymptotic condition \(m \to \infty\) and \(m / n \to 0\). The minimum-volatility selector is available when a fixed deterministic exponent is too brittle for a specific estimator/design path.

This implements the same minimum-volatility idea used in PTE's m-selection workflow: scan admissible intermediate sizes and choose a stable region of the target statistic rather than assuming one exponent is uniformly optimal.

The default b = NULL rule is a cheap deterministic intermediate sequence: \(b \to \infty\) and \(b / n \to 0\), as required by the Politis, Romano, and Wolf subsampling framework. The exponent 0.7 is a pragmatic interior point in \((0, 1)\); it is not a universal optimum. Use select_optimal_b_subsampling() for data-adaptive minimum-volatility selection.

The default b = NULL follows the intermediate-sequence convention from the Politis/Romano/Wolf subsampling literature: \(b \to \infty\) and \(b / n \to 0\). The deterministic exponent 0.7 is a first-pass default; for unstable paths prefer the minimum-volatility selector.

The NULL default is grounded in the standard Politis/Romano/Wolf asymptotic condition \(b \to \infty\) and \(b / n \to 0\). The minimum-volatility selector is available when a fixed deterministic exponent is too brittle for a specific estimator/design path.

This implements the same minimum-volatility idea used in PTE's m-selection workflow, applied to the PRW block/subsample-size choice: scan admissible intermediate sizes and choose a stable region of the target statistic rather than assuming one exponent is uniformly optimal.

Design-specific validity caveats for the nonparametric bootstrap

The nonparametric bootstrap resamples experimental units with replacement from their empirical distribution, carrying each unit's realized (x, w, y) into the replicate, and recomputes the estimator. Its validity rests on the resampled units being (approximately) iid draws from the design's unit-level superpopulation. Since covariate-adaptive designs induce dependence among the assignments \(w_i\) (and between \(w\) and \(X\)), the appropriate resampling unit and the fidelity with which the design's dependence is replicated differ by design. In all cases below the inference is asymptotic, never finite-sample exact (for exact finite-sample inference under the design's actual randomization mechanism, use the randomization tests and randomization confidence intervals instead). Where a balance constraint of the design is broken by resampling, the bootstrap variance is inflated relative to the design's true sampling variance, so tests and intervals err conservative (over-coverage), not anti-conservative.

DesignFixedBernoulli, DesignSeqOneByOneBernoulli

Assignments are iid coin flips independent of \(X\), so rows genuinely are iid and row-level resampling is fully justified. No caveat.

DesignFixediBCRD, DesignSeqOneByOneiBCRD

Assignment depends only on the treatment counts (completely randomized / without-replacement urn), inducing negative correlation among the \(w_i\) through the fixed-margin constraint. Row-level iid resampling does not replicate this constraint: replicates have a random number of treated subjects. The extra variability is \(O(1/n)\), so the bootstrap is conservative by an asymptotically negligible amount.

DesignSeqOneByOneEfron, DesignSeqOneByOneUrn

Assignment depends on the running treatment imbalance (not on \(X\)), inducing serial negative dependence among the \(w_i\). Row-level resampling ignores this dependence; as with fixed margins the effect on smooth estimators is \(O(1/n)\), so the bootstrap is conservative by a negligible amount.

DesignSeqOneByOneRandomBlockSize (no strata)

Permuted-block balance over entry order is broken by row-level resampling. Conservative, minor: only the counts constraint is lost since the design does not use \(X\).

DesignSeqOneByOneRandomBlockSize (with strata), DesignSeqOneByOneSPBR

Resampling is within-strata, preserving stratum sizes and the stratum-covariate composition. The within-block time-order balance inside each stratum is still broken, so replicates have random within-stratum treatment counts. Conservative, minor.

DesignFixedBlocking

Resampling is within-strata by default (bootstrap_type = "within_blocks"), preserving stratum sizes; the exact within-stratum treatment/control split is not enforced in replicates, so the block-randomization variance reduction is partially unreplicated. Conservative, minor. bootstrap_type = "resample_blocks" instead resamples whole blocks, preserving within-block composition at the price of fewer resampling atoms.

DesignFixedOptimalBlocks

Same within-block resampling caveats as DesignFixedBlocking, plus the blocks themselves are computed from the realized covariate sample: the block structure is a global function of the data that the bootstrap conditions on rather than re-derives. The justification for this conditioning is asymptotic: as \(n\) grows the blocking depends on the sample only through the (convergent) empirical distribution of \(X\), so between-block dependence vanishes. Conservative.

DesignFixedCluster

Assignment is at the cluster level and outcomes are correlated within clusters, so whole clusters are resampled with replacement. This is the correct exchangeable unit; with few clusters the bootstrap distribution rests on few resampling atoms and becomes unstable. Asymptotics are in the number of clusters, not the number of subjects.

DesignFixedBlockedCluster

Clusters are resampled within strata, matching both levels of the design's dependence (stratum and cluster). Sound, with the same small-sample caution: few clusters per stratum means few resampling atoms per stratum, and asymptotics are in the number of clusters.

DesignSeqOneByOnePocockSimon

Minimization makes each assignment a near-deterministic function of the running stratum-count imbalances. Row-level iid resampling does not replicate this balance-forcing, so the bootstrap variance corresponds to iid assignment rather than the (smaller) minimization-design variance (cf. Bugni, Canay & Shah 2018). Conservative, with the largest expected over-coverage among the sequential designs.

DesignSeqOneByOneAtkinson

The biased-coin \(D_A\)-optimal rule makes \(w_i\) depend on the full covariate and assignment history, and conditional assignment probabilities differ from 1/2. Row-level resampling does not replicate the covariate balance the rule enforces. Conservative, moderate.

DesignFixedGreedyDOptimal, DesignFixedGreedy, DesignFixedRerandomization

The observed \(w\) vector is one draw from a tightly constrained (optimized or acceptance-sampled) set of allocations. Resampled replicates carry per-row assignments whose recombined \(w\) vector no longer satisfies the balance constraint, so the bootstrap reflects the variance of unconstrained assignment (cf. Li, Ding & Rubin 2018 for rerandomization). Conservative, moderate-to-large: the stronger the optimization, the greater the over-coverage.

DesignFixedMatchingGreedyPairSwitching

The greedy switching search only ever flips assignments within binary-match pairs, so every pair has exactly one treated subject; the bootstrap resamples intact pairs, preserving the within-pair anticorrelation. Remaining caveats: the pairing is a global function of the sample (conditioned on, justified asymptotically as for the matched designs below), and the greedy choice of which pair member is treated couples the pairs, which resampling does not replicate — the residual effect errs conservative.

DesignFixedBinaryMatch

Matched pairs are resampled intact, preserving the within-pair anticorrelation of \(w\) and the pair-level variance reduction. The pairing itself is a global function of the covariate sample (an Abadie & Imbens 2008-type concern): pairs are exchangeable but not exactly independent. Validity is asymptotic — as \(n\) grows the pairing depends on the sample only through the empirical distribution of \(X\) and between-pair dependence vanishes — and the bootstrap conditions on the realized match structure.

DesignSeqOneByOneKK14

Matched pairs and reservoir subjects are resampled separately as intact units, preserving within-pair anticorrelation and the reservoir's Bernoulli assignments. Same asymptotic caveats as the fixed matched designs, plus the split between number of pairs and reservoir size is treated as fixed rather than random. Sound asymptotically.

DesignSeqOneByOneKK21, DesignSeqOneByOneKK21stepwise

All DesignSeqOneByOneKK14 caveats apply, plus the matching weights are estimated from earlier responses, so \(W\) depends on \(y\) as well as \(X\). The bootstrap conditions on the realized response-adaptive weights and match structure rather than replicating their sampling variability; this extra conditioning is not quantified, and validity remains asymptotic.

DesignFixedFactorial

Row-level resampling does not replicate the balanced allocation across factor combinations. Conservative, minor.

DesignFixedCustom, DesignCustomSequential

Warning: iid row-level resampling is used because the package has no knowledge of the user-supplied assignment mechanism. If that mechanism balances on covariates, the bootstrap is likely conservative; if it induces clustering or other positive dependence, the bootstrap may not even be valid (anti-conservative). Use the randomization-based inference, which draws from the actual custom mechanism, whenever possible.

References

Bickel, P. J., Gotze, F., and van Zwet, W. R. (1997). Resampling fewer than n observations: gains, losses, and remedies for losses. Statistica Sinica.

Bickel, P. J. and Sakov, A. (2008). On the choice of m in the m out of n bootstrap. The Annals of Statistics.

Politis, D. N., Romano, J. P., and Wolf, M. (1999). Subsampling. Springer.

Super classes

Inference -> InferenceRand -> InferenceRandCI -> InferenceNonParamBootstrap

Methods

+ inherited public methods from InferenceRandCI
  • InferenceRandCI$compute_rand_confidence_interval()
  • InferenceRandCI$compute_rand_two_sided_pval()
+ inherited public methods from InferenceRand
+ inherited public methods from Inference


InferenceNonParamBootstrap$get_supported_bootstrap_pval_types()

Returns the type values compute_bootstrap_two_sided_pval() accepts.

Usage

InferenceNonParamBootstrap$get_supported_bootstrap_pval_types()


InferenceNonParamBootstrap$get_supported_bootstrap_ci_types()

Returns the type values compute_bootstrap_confidence_interval() accepts.

Usage

InferenceNonParamBootstrap$get_supported_bootstrap_ci_types()


InferenceNonParamBootstrap$approximate_m_out_of_n_bootstrap_distribution_beta_hat_T()

Creates the m-out-of-n bootstrap distribution of the treatment-effect estimate.

Usage

InferenceNonParamBootstrap$approximate_m_out_of_n_bootstrap_distribution_beta_hat_T(
  B = 501,
  m = NULL,
  show_progress = TRUE,
  debug = FALSE,
  bootstrap_type = NULL,
  scaling = "sqrt_n",
  center = "full_estimate"
)

Arguments

B

Number of resamples. Default 501.

m

Number of exchangeable resampling units drawn with replacement. If NULL (default), use the deterministic intermediate-size rule floor(n_units^0.7), where n_units is the number of exchangeable units used by the design (observations, clusters, pairs, or matched sets). The resolved value must satisfy max(5, p_eff + 2) <= m <= floor(n_units / 2).

show_progress

A flag indicating whether a progress bar should be displayed.

debug

If TRUE, return distribution diagnostics in addition to the resampled estimates.

bootstrap_type

Optional empirical-resampling scheme. See approximate_bootstrap_distribution_beta_hat_T().

scaling

Scaling sequence for centered m-out-of-n pivots. The default "sqrt_n" uses sqrt(m) for the m-sample distribution and converts back to the full-sample scale using sqrt(n_units).

center

Centering convention for diagnostics and cache keys.

Returns

A numeric vector of bootstrap estimates, or when debug = TRUE, a diagnostic list.


InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_two_sided_pval()

Computes a centered m-out-of-n bootstrap two-sided p-value.

Usage

InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_two_sided_pval(
  delta = 0,
  B = 501,
  m = NULL,
  type = "centered",
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  bootstrap_type = NULL,
  scaling = "sqrt_n"
)

Arguments

delta

Null treatment effect. Default 0.

B

Number of resamples. Default 501.

m

Number of exchangeable units drawn with replacement. If NULL (default), use floor(n_units^0.7) subject to the validation bounds documented for approximate_m_out_of_n_bootstrap_distribution_beta_hat_T().

type

P-value type. Currently only "centered" is supported.

show_progress

A flag indicating whether a progress bar should be displayed.

min_number_usable_samples

Minimum number of finite resampled estimates required after filtering. Default 5.

bootstrap_type

Optional empirical-resampling scheme.

scaling

Scaling sequence for centered m-out-of-n pivots.

Returns

A numeric two-sided p-value, or NA_real_ if the path is non-estimable.


InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_confidence_interval()

Computes a basic m-out-of-n bootstrap confidence interval.

Usage

InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_confidence_interval(
  alpha = 0.05,
  B = 501,
  m = NULL,
  type = "basic",
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  bootstrap_type = NULL,
  scaling = "sqrt_n"
)

Arguments

alpha

Significance level. Default 0.05.

B

Number of resamples. Default 501.

m

Number of exchangeable units drawn with replacement. If NULL (default), use floor(n_units^0.7) subject to the validation bounds documented for approximate_m_out_of_n_bootstrap_distribution_beta_hat_T().

type

Confidence-interval type. Currently only "basic" is supported.

show_progress

A flag indicating whether a progress bar should be displayed.

min_number_usable_samples

Minimum number of finite resampled estimates required after filtering. Default 5.

bootstrap_type

Optional empirical-resampling scheme.

scaling

Scaling sequence for centered m-out-of-n pivots.

Returns

A length-2 numeric confidence interval, or c(NA_real_, NA_real_) if the path is non-estimable.


InferenceNonParamBootstrap$select_optimal_m_out_of_n_bootstrap()

Selects an m-out-of-n bootstrap size by minimum volatility.

Usage

InferenceNonParamBootstrap$select_optimal_m_out_of_n_bootstrap(
  B = 251,
  alpha = 0.05,
  m_pow_of_n_grid = seq(0.5, 0.9, by = 0.05),
  m_grid = NULL,
  objective = "ci_width",
  target = "ci",
  volatility_window = 3L,
  bootstrap_type = NULL,
  scaling = "sqrt_n",
  show_progress = TRUE,
  min_finite_fraction = 0.8
)

Arguments

B

Number of resamples per candidate size. Default 251.

alpha

Significance level for interval-width objectives.

m_pow_of_n_grid

Candidate exponent grid used when m_grid = NULL. Defaults to seq(0.5, 0.9, by = 0.05).

m_grid

Optional explicit integer candidate sizes.

objective

Selection objective. Currently "ci_width".

target

Target summary. Currently "ci".

volatility_window

Rolling window size used to measure local volatility across candidate sizes.

bootstrap_type

Optional empirical-resampling scheme.

scaling

Scaling sequence for centered m-out-of-n pivots.

show_progress

A flag indicating whether a progress bar should be displayed.

min_finite_fraction

Minimum finite-resample fraction required for a candidate size to be eligible.

Returns

An EDIMOutOfNBootstrapMSelection list with the selected m, mapped exponent, candidate table, status, and reason.


InferenceNonParamBootstrap$approximate_subsampling_distribution_beta_hat_T()

Creates the Politis/Romano/Wolf subsampling distribution of the treatment-effect estimate.

Usage

InferenceNonParamBootstrap$approximate_subsampling_distribution_beta_hat_T(
  B = 501,
  b = NULL,
  show_progress = TRUE,
  debug = FALSE,
  subsampling_type = NULL,
  scaling = "sqrt_n",
  center = "full_estimate"
)

Arguments

B

Number of subsamples. Default 501.

b

Number of exchangeable units drawn without replacement. If NULL (default), use the deterministic intermediate-size rule floor(n_units^0.7), where n_units is the number of exchangeable units used by the design (observations, clusters, pairs, or matched sets). The resolved value must satisfy max(5, p_eff + 2) <= b <= floor(n_units / 2).

show_progress

A flag indicating whether a progress bar should be displayed.

debug

If TRUE, return distribution diagnostics in addition to the subsampled estimates.

subsampling_type

Optional empirical-resampling scheme. See approximate_bootstrap_distribution_beta_hat_T().

scaling

Scaling sequence for centered subsampling pivots. The default "sqrt_n" uses sqrt(b) for the subsample distribution and converts back to the full-sample scale using sqrt(n_units).

center

Centering convention for diagnostics and cache keys.

Returns

A numeric vector of subsampled estimates, or when debug = TRUE, a diagnostic list.


InferenceNonParamBootstrap$compute_subsampling_two_sided_pval()

Computes a centered PRW subsampling two-sided p-value.

Usage

InferenceNonParamBootstrap$compute_subsampling_two_sided_pval(
  delta = 0,
  B = 501,
  b = NULL,
  type = "centered",
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  subsampling_type = NULL,
  scaling = "sqrt_n"
)

Arguments

delta

Null treatment effect. Default 0.

B

Number of subsamples. Default 501.

b

Number of exchangeable units drawn without replacement. If NULL (default), use floor(n_units^0.7) subject to the validation bounds documented for approximate_subsampling_distribution_beta_hat_T().

type

P-value type. Currently only "centered" is supported.

show_progress

A flag indicating whether a progress bar should be displayed.

min_number_usable_samples

Minimum number of finite subsampled estimates required after filtering. Default 5.

subsampling_type

Optional empirical-resampling scheme.

scaling

Scaling sequence for centered subsampling pivots.

Returns

A numeric two-sided p-value, or NA_real_ if the path is non-estimable.


InferenceNonParamBootstrap$compute_subsampling_confidence_interval()

Computes a basic PRW subsampling confidence interval.

Usage

InferenceNonParamBootstrap$compute_subsampling_confidence_interval(
  alpha = 0.05,
  B = 501,
  b = NULL,
  type = "basic",
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  subsampling_type = NULL,
  scaling = "sqrt_n"
)

Arguments

alpha

Significance level. Default 0.05.

B

Number of subsamples. Default 501.

b

Number of exchangeable units drawn without replacement. If NULL (default), use floor(n_units^0.7) subject to the validation bounds documented for approximate_subsampling_distribution_beta_hat_T().

type

Confidence-interval type. Currently only "basic" is supported.

show_progress

A flag indicating whether a progress bar should be displayed.

min_number_usable_samples

Minimum number of finite subsampled estimates required after filtering. Default 5.

subsampling_type

Optional empirical-resampling scheme.

scaling

Scaling sequence for centered subsampling pivots.

Returns

A length-2 numeric confidence interval, or c(NA_real_, NA_real_) if the path is non-estimable.


InferenceNonParamBootstrap$select_optimal_b_subsampling()

Selects a PRW subsampling size by minimum volatility.

Usage

InferenceNonParamBootstrap$select_optimal_b_subsampling(
  B = 251,
  alpha = 0.05,
  b_pow_of_n_grid = seq(0.5, 0.9, by = 0.05),
  b_grid = NULL,
  objective = "ci_width",
  target = "ci",
  volatility_window = 3L,
  subsampling_type = NULL,
  scaling = "sqrt_n",
  show_progress = TRUE,
  min_finite_fraction = 0.8
)

Arguments

B

Number of subsamples per candidate size. Default 251.

alpha

Significance level for interval-width objectives.

b_pow_of_n_grid

Candidate exponent grid used when b_grid = NULL. Defaults to seq(0.5, 0.9, by = 0.05).

b_grid

Optional explicit integer candidate sizes.

objective

Selection objective. Currently "ci_width".

target

Target summary. Currently "ci".

volatility_window

Rolling window size used to measure local volatility across candidate sizes.

subsampling_type

Optional empirical-resampling scheme.

scaling

Scaling sequence for centered subsampling pivots.

show_progress

A flag indicating whether a progress bar should be displayed.

min_finite_fraction

Minimum finite-subsample fraction required for a candidate size to be eligible.

Returns

An EDISubsamplingBSelection list with the selected b, mapped exponent, candidate table, status, and reason.


InferenceNonParamBootstrap$compute_subsampling_sensitivity()

Computes PRW subsampling sensitivity over candidate sizes.

Usage

InferenceNonParamBootstrap$compute_subsampling_sensitivity(
  B = 251,
  alpha = 0.05,
  b_pow_of_n_grid = seq(0.5, 0.9, by = 0.05),
  b_grid = NULL,
  objective = "ci_width",
  target = "ci",
  volatility_window = 3L,
  subsampling_type = NULL,
  scaling = "sqrt_n",
  show_progress = TRUE,
  min_finite_fraction = 0
)

Arguments

B

Number of subsamples per candidate size. Default 251.

alpha

Significance level for interval-width objectives.

b_pow_of_n_grid

Candidate exponent grid used when b_grid = NULL. Defaults to seq(0.5, 0.9, by = 0.05).

b_grid

Optional explicit integer candidate sizes.

objective

Selection objective. Currently "ci_width".

target

Target summary. Currently "ci".

volatility_window

Rolling window size used to measure local volatility across candidate sizes.

subsampling_type

Optional empirical-resampling scheme.

scaling

Scaling sequence for centered subsampling pivots.

show_progress

A flag indicating whether a progress bar should be displayed.

min_finite_fraction

Minimum finite-subsample fraction required for a candidate size to be eligible. Defaults to 0 for sensitivity scans.

Returns

An EDISubsamplingSensitivity list containing the candidate grid table without selecting a final b.


InferenceNonParamBootstrap$approximate_bootstrap_distribution_beta_hat_T()

Creates the bootstrap distribution of the estimate for the treatment effect. The resampling unit is design-specific (rows, within-strata rows, matched pairs plus reservoir, or clusters); see the class-level section Design-specific validity caveats for the nonparametric bootstrap for the conservativeness and asymptotics of each concrete design.

Usage

InferenceNonParamBootstrap$approximate_bootstrap_distribution_beta_hat_T(
  B = 501,
  show_progress = TRUE,
  debug = FALSE,
  bootstrap_type = NULL
)

Arguments

B

Number of bootstrap samples. The default is 501.

show_progress

A flag indicating whether a progress bar should be displayed.

debug

If TRUE, return a list with the distribution values and per-iteration diagnostics including error messages, warning messages, counts of each, and summary proportions for iterations with errors, warnings, and illegal (non-finite) values. Runs serially. Default FALSE.

bootstrap_type

Optional bootstrap-resampling scheme. Legal public values are:

NULL

Use the design's default row-resampling bootstrap. For ordinary non-blocking designs this is the usual subject-level resample-with-replacement bootstrap. For certain blocking designs, NULL maps to the same behavior as "within_blocks".

"within_blocks"

Only legal for blocking-style designs that support block-aware bootstrap resampling: DesignFixedBlocking, DesignFixedOptimalBlocks, DesignSeqOneByOneSPBR, and DesignFixedBlockedCluster. Resamples observational units within each observed block/stratum. For blocked cluster designs this means resampling clusters within strata.

"resample_blocks"

Only legal for the same blocking-style designs as "within_blocks". Resamples entire observed blocks/strata with replacement rather than resampling units within each block.

Any non-NULL value is rejected for designs outside that blocking family.

Returns

When debug = FALSE (default), a numeric vector of length B containing the bootstrap estimates. When debug = TRUE, a list with: values, errors (list of character vectors, one per iteration), warnings (list of character vectors, one per iteration), num_errors, num_warnings, prop_iterations_with_errors, prop_iterations_with_warnings, and prop_illegal_values.


InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval()

Computes a bootstrap-based two-sided p-value for the treatment effect. Validity is asymptotic and design-dependent; for most covariate-adaptive designs the p-value errs conservative. See the class-level section Design-specific validity caveats for the nonparametric bootstrap.

Usage

InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval(
  delta = 0,
  B = 501,
  type = NULL,
  na.rm = FALSE,
  show_progress = TRUE,
  min_number_usable_samples = 5L
)

Arguments

delta

Null hypothesis value. Default 0.

B

Number of bootstrap samples. Default 501.

type

Bootstrap p-value type. Supported values are "percentile" (default), "symmetric", "studentized", "bootstrap-t", and "bca". "percentile": shifts the bootstrap distribution to be centred at delta and counts the two-tail proportion (Hall 1992). "symmetric": uses \(|T^* - \bar{T}^*| \ge |t_{\rm obs} - \delta|\) for a symmetric one-sample test; recommended by Hall & Wilson (1991) when the null distribution may be skewed. This pooled-tail test is offered only as a p-value here, not as a confidence-interval type in compute_bootstrap_confidence_interval: pooling both tails via \(|\cdot|\) improves testing power (Hall & Wilson's original use case), but inverting it unstudentized would add no value as an interval. The unstudentized pivot is not asymptotically pivotal, so the resulting interval would have the same first-order \(O(n^\{-1/2\})\) coverage error as "percentile"/ "basic", while forcing symmetric bounds around a possibly skewed bootstrap distribution — strictly worse than "percentile"/"basic" for shape-adaptivity, and strictly worse than "symmetric-percentile-t" for accuracy, since studentizing (not the absolute-value pooling) is what buys the \(O(n^\{-1\})\) improvement. The CI-worthy symmetric variant is therefore "symmetric-percentile-t" (studentized pivot), not a plain "symmetric" CI type. "studentized" / "bootstrap-t": pivots by the per-replicate standard error, giving O(n^{-1}) error versus O(n^{-1/2}) for the percentile method (Hall 1992; Davidson & MacKinnon 1999). "bca": bias-corrected and accelerated p-value via closed-form CI inversion using the jackknife acceleration and bias-correction constants; second-order accurate (Efron 1987; Efron & Tibshirani 1993).

na.rm

Remove non-finite bootstrap replicates. Default FALSE.

show_progress

A flag indicating whether a progress bar should be displayed.

min_number_usable_samples

Minimum number of finite bootstrap samples required after filtering. Default 5. Must be less than or equal to B.

Returns

A bootstrap two-sided p-value.


InferenceNonParamBootstrap$compute_bootstrap_confidence_interval()

Computes a bootstrap-based confidence interval. Coverage is asymptotic and design-dependent; for most covariate-adaptive designs the interval errs conservative (over-coverage). See the class-level section Design-specific validity caveats for the nonparametric bootstrap.

Usage

InferenceNonParamBootstrap$compute_bootstrap_confidence_interval(
  alpha = 0.05,
  B = 501,
  type = NULL,
  na.rm = TRUE,
  show_progress = TRUE,
  min_number_usable_samples = 5L
)

Arguments

alpha

The confidence level 1 - alpha. Default 0.05.

B

Number of bootstrap samples. Default 501.

type

Bootstrap CI type. Supported values are "percentile", "basic", "studentized", "bootstrap-t", "symmetric-percentile-t", "bca", "prepivoted", "double-bootstrap", "calibrated", and "smoothed". There is no plain "symmetric" CI type (contrast with the "symmetric" p-value type in compute_bootstrap_two_sided_pval): inverting the unstudentized Hall & Wilson pooled-tail statistic would add no value as an interval, since it is not asymptotically pivotal and so has the same first-order \(O(n^\{-1/2\})\) coverage error as "percentile"/"basic", while forcing symmetric bounds around a possibly skewed bootstrap distribution — strictly worse than "percentile"/ "basic" for shape-adaptivity, and strictly worse than "symmetric-percentile-t" for accuracy, since studentizing (not the absolute-value pooling) is what buys the \(O(n^\{-1\})\) improvement. "symmetric-percentile-t" is the CI-worthy symmetric variant.

na.rm

Remove non-finite bootstrap replicates. Default TRUE. Non-finite replicates are always removed internally.

show_progress

Show progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required after filtering. Default 5. Must be less than or equal to B.

Returns

A bootstrap confidence interval.


InferenceNonParamBootstrap$clone()

The objects of this class are cloneable with this method.

Usage

InferenceNonParamBootstrap$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.