Abstract class for delete-1 jackknife estimate correction and jackknife-Wald inference layered on top of bootstrap-capable inference classes.
Deletion units. With unit = "auto" each replicate deletes one unit
of the design's randomization structure:
matching designs: one matched pair (
"pair"), or for KK designs one matched set or one reservoir subject ("matched_set");cluster designs: one cluster (
"cluster");DesignSeqOneByOneSPBR: one permuted block ("permuted_block"), theblock_sizeconsecutive enrollees of a stratum that the design randomized together; a trailing partial block of a stratum is merged into that stratum's previous block;DesignSeqOneByOneRandomBlockSize: one permuted block ("permuted_block"), as recorded when the design drew it (block sizes are random), with the same rule for a stratum's trailing unfilled block; a design object saved before EDI 1.0.6 has no such record and uses"block";on both of these designs, when any stratum holds fewer than 10 permuted-block units, one subject grouped by its stratum (
"observation_within_block") instead: with few blocks in a stratum the permuted-block jackknife-Wald test rejected a true null too often (about 0.06 at a nominal 0.05 with 3-9 blocks in the smallest stratum, against 0.05-0.055 deleting single subjects; v1.0.6-TODO-270);DesignFixedBlocking: one subject, grouped by its stratum ("observation_within_block");ObservationalDesignBlocks: one whole block ("block", right for matched sets and clusters) when there are at least 5 blocks; with fewer, one subject grouped by its block as a stratum ("observation_within_block"), since leave-one-block-out would have too few units (v1.0.6-TODO-231);other blocking designs: one whole block (
"block");all other designs: one subject (
"observation").
Any of these can also be requested explicitly through unit
("permuted_block" only on SPBR and RandomBlockSize; "block" and
"observation_within_block" on any blocking design).
Formulas. With \(\hat\theta\) the full-data estimate and
\(\hat\theta_{(i)}\) the estimate with unit \(i\) deleted, an unstratified unit
(\(G\) units, mean \(\bar\theta\)) gives bias
\((G - 1)(\bar\theta - \hat\theta)\) and variance
\(\frac{G - 1}{G} \sum_i (\hat\theta_{(i)} - \bar\theta)^2\). The two stratified
units ("permuted_block", "observation_within_block") use the stratified
delete-1 ("JKn") jackknife of Wolter (2007, Sec. 4.5). Wolter's replicate deletes unit
\(i\) of stratum \(h\) and reweights that stratum's other \(n_h - 1\) units by
\(n_h/(n_h - 1)\); EDI's replicates are refits on the remaining rows without
reweighting, so each replicate's departure from \(\hat\theta\) is first scaled by
\(r_h = n_h (N - 1) / \{N (n_h - 1)\}\) (\(N\) units in all), its first-order
reweighted equivalent: \(\theta^*_{(h,i)} = \hat\theta + r_h (\hat\theta_{(h,i)} - \hat\theta)\).
With \(\bar\theta^*_h\) the stratum mean of these, Wolter's formulas give bias
\(\sum_h (n_h - 1)(\bar\theta^*_h - \hat\theta)\) and variance
\(\sum_h \frac{n_h - 1}{n_h} \sum_{i \in h} (\theta^*_{(h,i)} - \bar\theta^*_h)^2
= (\frac{N - 1}{N})^2 \sum_h \frac{n_h}{n_h - 1} \sum_{i \in h} (\hat\theta_{(h,i)} - \bar\theta_h)^2\);
with no single-unit stratum the bias equals the ordinary \((N - 1)(\bar\theta - \hat\theta)\),
and with one stratum both reduce to the unstratified formulas.
Why the replicates are rescaled, and what that does to the bias. Deleting unit
\((h, i)\) and refitting on the other \(N - 1\) units moves the estimate by about
\(1/(N - 1)\) of that unit's influence and also shifts every stratum's share of the
data; Wolter's reweighted replicate keeps stratum \(h\)'s share and moves the estimate
by \(n_h / \{N (n_h - 1)\}\) of the unit's influence measured from its stratum mean. To
first order the two differ, within a stratum, by the factor \(r_h\) and a constant,
and the constant cancels in the within-stratum variance; so the rescaled variance is
Wolter's to first order, while Wolter's weight \((n_h - 1)/n_h\) applied to the raw
refits would understate it by about \(((n_h - 1)/n_h)^2\) per stratum. The bias form
\(\sum_h (n_h - 1)(\bar\theta^*_h - \hat\theta)\) is the stratified jackknife bias
of Jones (1974), as in Wolter (2007, Sec. 4.5): on genuinely reweighted replicates it
estimates the bias of a smooth function of the stratum means from the within-stratum
spread alone. The bias is a second-order quantity, though, and the first-order
rescaling does not carry it over: on the rescaled refits the formula equals the
ordinary unstratified bias \((N - 1)(\bar\theta - \hat\theta)\), which also counts the
spread of the outcome between strata. For a linear estimator (a difference in means)
both are 0; for a nonlinear one with strongly different strata the bias correction can
be too large (v1.0.6-TODO-231). The jackknife-Wald test and interval are centred at the
bias-corrected estimate.
The strata are fixed by the design and treatment is randomized within them, so only
the within-stratum spread of the replicates enters the variance. A stratum with a
single unit contributes nothing to either sum. The bias-corrected jackknife estimate is
\(\hat\theta\) minus the bias, and the jackknife-Wald test and interval use it with
the jackknife standard error. The reference distribution is the normal for the
unstratified units and, since EDI 1.0.6, the t distribution with
\(\sum_h (n_h - 1)\) degrees of freedom (the degrees of freedom of the stratified
variance) for the stratified units "permuted_block" and
"observation_within_block" (v1.0.6-TODO-231: on SPBR with about 31 degrees of
freedom the normal-reference 95% interval covered 0.930 and the t interval 0.943).
They are NA when the variance has fewer than 4 degrees of freedom
(\(G - 1\), or \(\sum_h (n_h - 1)\) for the stratified units).
Before EDI 1.0.6 the automatic unit on SPBR and DesignFixedBlocking was the
block, which on these designs is the stratum, so a replicate deleted a whole stratum
and the jackknife had only 2-4 units (v1.0.6-TODO-4).
BCa acceleration. The BCa bootstrap interval and p-value of the nonparametric bootstrap take their acceleration from the same jackknife. On the stratified units it is the skewness of the empirical influence values centred within strata, \(a = \sum_h c_h^3 \sum_i d_{hi}^3 / \{6 (\sum_h c_h^2 \sum_i d_{hi}^2)^{3/2}\}\) with \(d_{hi} = \bar\theta^*_h - \theta^*_{(h,i)}\) and \(c_h = (n_h - 1)/n_h\) (the stratified form of the influence-function acceleration, Davison and Hinkley 1997); with one stratum this is Efron's formula, and other units keep it unchanged.
References
Jones, H. L. (1974). Jackknife estimation of functions of stratum means. Biometrika, 61(2), 343-348, doi:10.1093/biomet/61.2.343 .
Krewski, D. and Rao, J. N. K. (1981). Inference from stratified samples: properties of the linearization, jackknife and balanced repeated replication methods. The Annals of Statistics, 9(5), 1010-1019, doi:10.1214/aos/1176345580 .
Davison, A. C. and Hinkley, D. V. (1997). Bootstrap Methods and their Application. Cambridge University Press, doi:10.1017/CBO9780511802843 .
Wolter, K. M. (2007). Introduction to Variance Estimation, 2nd ed. Springer, New York, ch. 4 "The Jackknife Method" (pp. 151-193), Sec. 4.5 (stratified sampling), doi:10.1007/978-0-387-35099-8 .
Super classes
Inference -> InferenceResamplingCore -> InferenceRand -> InferenceRandCI -> InferenceNonParamBootstrap -> InferenceRandBootstrap -> InferenceRandBootstrapCI -> InferenceBayesianBootstrap -> InferenceJackknife
Methods
Public methods
+ inherited public methods from InferenceBayesianBootstrap
InferenceBayesianBootstrap$approximate_bayesian_bootstrap_distribution_beta_hat_T()InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval()InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval()InferenceBayesianBootstrap$compute_estimate_with_bootstrap_weights()InferenceBayesianBootstrap$get_supported_bayesian_bootstrap_ci_types()InferenceBayesianBootstrap$get_supported_bayesian_bootstrap_pval_types()+ inherited public methods from InferenceRandBootstrapCI
+ inherited public methods from InferenceRandBootstrap
+ inherited public methods from InferenceNonParamBootstrap
InferenceNonParamBootstrap$approximate_bootstrap_distribution_beta_hat_T()InferenceNonParamBootstrap$approximate_m_out_of_n_bootstrap_distribution_beta_hat_T()InferenceNonParamBootstrap$approximate_subsampling_distribution_beta_hat_T()InferenceNonParamBootstrap$compute_bootstrap_confidence_interval()InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval()InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_confidence_interval()InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_two_sided_pval()InferenceNonParamBootstrap$compute_subsampling_confidence_interval()InferenceNonParamBootstrap$compute_subsampling_sensitivity()InferenceNonParamBootstrap$compute_subsampling_two_sided_pval()InferenceNonParamBootstrap$get_supported_bootstrap_ci_types()InferenceNonParamBootstrap$get_supported_bootstrap_pval_types()InferenceNonParamBootstrap$select_optimal_b_subsampling()InferenceNonParamBootstrap$select_optimal_m_out_of_n_bootstrap()+ inherited public methods from InferenceRandCI
+ inherited public methods from InferenceRand
+ inherited public methods from Inference
Inference$capabilities()Inference$clear_randomization_cache()Inference$compute_asymp_confidence_interval()Inference$compute_asymp_two_sided_pval()Inference$compute_estimate()Inference$compute_exact_confidence_interval()Inference$compute_exact_two_sided_pval_for_treatment_effect()Inference$duplicate()Inference$get_analysis_data()Inference$get_covariates()Inference$get_design_object()Inference$get_estimand()Inference$get_model_formula()Inference$get_nonestimable_reason()Inference$get_nonestimable_stage()Inference$get_optimization_alg()Inference$get_procedure_validity()Inference$get_response()Inference$get_response_type()Inference$get_summary()Inference$get_supported_estimands()Inference$get_treatment()Inference$initialize()Inference$is_nonestimable()Inference$set_estimand()Inference$set_optimization_alg()Inference$set_seed()Inference$supports()
InferenceJackknife$approximate_jackknife_distribution_beta_hat_T()
Returns the leave-one-out jackknife estimate distribution.
InferenceJackknife$compute_jackknife_estimate()
Computes the delete-1 jackknife bias-corrected treatment estimate.
The automatic deletion unit (unit = "auto") follows the design: see
Deletion units in InferenceJackknife.
The estimate is the full-data estimate minus
$compute_jackknife_bias_estimate(); see that method for a caveat on the
stratified units ("permuted_block", "observation_within_block").
InferenceJackknife$compute_jackknife_bias_estimate()
Computes the jackknife bias estimate.
Unstratified units: \((G - 1)(\bar\theta - \hat\theta)\). Stratified units
("permuted_block", "observation_within_block"): the stratified
jackknife bias \(\sum_h (n_h - 1)(\bar\theta^*_h - \hat\theta)\) (Jones 1974;
Wolter 2007, Sec. 4.5) applied to EDI's leave-unit-out refits rescaled to their
first-order reweighted equivalents. That rescaling is exact enough for the variance
but not for this second-order quantity: the result equals the ordinary
\((N - 1)(\bar\theta - \hat\theta)\), which also counts the spread of the outcome
between strata. It is 0 for a difference in means; for a nonlinear estimator
(log odds ratio, log hazard ratio, ...) with strongly different strata it can be
too large (in simulations up to about 0.4 standard errors), and so can the shift of
$compute_jackknife_estimate() and of the jackknife-Wald interval centre.
See Formulas in InferenceJackknife.
InferenceJackknife$compute_jackknife_std_error()
Computes the delete-1 jackknife standard error.
The automatic deletion unit (unit = "auto") follows the design: see
Deletion units in InferenceJackknife.
InferenceJackknife$compute_jackknife_wald_two_sided_pval()
Computes a two-sided Wald p-value using the jackknife estimate and jackknife standard error.
The automatic deletion unit (unit = "auto") follows the design: see
Deletion units in InferenceJackknife.
The reference distribution is the normal, except for the stratified units
("permuted_block", "observation_within_block"), which use t with
\(\sum_h (n_h - 1)\) degrees of freedom (EDI 1.0.6). The statistic is centred at
the bias-corrected estimate; see $compute_jackknife_bias_estimate().
InferenceJackknife$compute_jackknife_wald_confidence_interval()
Computes a Wald confidence interval using the jackknife estimate and jackknife standard error.
The automatic deletion unit (unit = "auto") follows the design: see
Deletion units in InferenceJackknife.
The interval is estimate \(\pm\) quantile \(\times\) SE with the normal
quantile, except for the stratified units ("permuted_block",
"observation_within_block"), which use the t quantile with
\(\sum_h (n_h - 1)\) degrees of freedom (EDI 1.0.6). It is centred at the
bias-corrected estimate; see $compute_jackknife_bias_estimate().
