
Exact Zhang Combined-Test Incidence Inference
Source:R/inference_incidence_exact_zhang.R
InferenceIncidExactZhang.RdPerforms exact inference for a binary (incidence) outcome that
combines two exact component tests when the design has both
matched-pair and reservoir (unmatched) subjects — an internal-to-this-package
method (not drawn from external literature) analogous in spirit to
InferenceIncidExactBinomial
(matched pairs) and InferenceIncidExactFisher
(unmatched 2x2 table), fused into one combined exact test rather than a
Wald-style variance combination. The point estimate is always the
Haldane-Anscombe continuity-corrected log odds ratio \(\log\left((n_{11} +
0.5)(n_{00} + 0.5) / \left((n_{10}+0.5)(n_{01}+0.5)\right)\right)\) from the
pooled \(2\times2\) table across all subjects (matched and reservoir
together). For p-values and confidence intervals, the two
subsets are tested separately (an exact matched-pairs binomial test, as in
InferenceIncidExactBinomial, on discordant pairs; an exact Fisher test
on the reservoir \(2\times2\) table, as in InferenceIncidExactFisher),
and their p-values are combined via combination_method: "Fisher"
(default; \(-2(\log p_M + \log p_R) \sim \chi^2_4\) under independence),
"Stouffer" (averaged z-scores), or "min_p" (Šidák-style
\(1-(1-\min(p_M,p_R))^2\)). If only one of the two subsets is informative
(e.g. a pure-Bernoulli design with no matching, or no discordant pairs), the
combined p-value degenerates to that one component's p-value. Confidence
intervals are obtained by numerically inverting (bisection) the combined
p-value as a function of the hypothesized log odds ratio, starting from a
normal-approximation (Haldane-Anscombe MLE) interval as the search bracket.
Requires a Bernoulli-capable or matching-capable design.
Super class
Inference -> InferenceIncidExactZhang
Methods
+ inherited public methods from Inference
Inference$capabilities()Inference$compute_asymp_confidence_interval()Inference$compute_asymp_two_sided_pval()Inference$compute_exact_two_sided_pval_for_treatment_effect()Inference$duplicate()Inference$get_analysis_data()Inference$get_covariates()Inference$get_design_object()Inference$get_model_formula()Inference$get_nonestimable_reason()Inference$get_nonestimable_stage()Inference$get_optimization_alg()Inference$get_response()Inference$get_response_type()Inference$get_treatment()Inference$is_nonestimable()Inference$set_optimization_alg()Inference$set_seed()Inference$supports()
InferenceIncidExactZhang$new()
Usage
InferenceIncidExactZhang$new(
des_obj,
model_formula = NULL,
verbose = FALSE,
smart_cold_start_default = NULL
)Arguments
des_objA completed
Designobject whose entire n subjects are assigned and response y is recorded within.model_formulaOptional formula for covariate adjustment. If
NULL(default), the formula from the design object is used and its pre-computed design matrix is reused. If a formula is provided, a new design matrix is constructed from the design's imputed covariates.verboseWhether to print progress messages.
smart_cold_start_defaultWhether to use smart cold start values by default for likelihood-based models. Explicit starts always override this object-level policy.
NULL(default) consults the global cold-start dispatch policy.