
Bai Adjusted-t Mean-Difference Inference for KK21 Designs
Source:R/inference_continuous_KK21_bai.R
InferenceBaiAdjustedTKK21.RdContinuous-response mean-difference inference for designs assigned by
DesignSeqOneByOneKK21 (the
Kapelner-Krieger 2021 sequential matching-on-the-fly design with
covariate-weighted matching). The point estimate and its variance are the
closed-form Bai-adjusted-t combination of the matched-pairs mean
difference and the unmatched-reservoir mean difference,
inverse-variance-weighted when both are usable; see
InferenceBaiAdjustedTKK14 for
the full formula, the pair-distance definition, and the
confidence-interval/p-value construction shared with this class.
The two leaves differ only in how pair distance is defined during
matching: this class (KK21) uses the design's covariate-weighted squared
distance \(\sum_j w_j (x_{1j} - x_{2j})^2\), where \(w_j\) are the
design's covariate_weights (see
DesignSeqOneByOneKK21), unlike
KK14's unweighted distance. Because the estimator is closed-form,
initialization does not use warm starts (there is no iterative fit to
warm-start).
Super class
Inference -> InferenceBaiAdjustedTKK21
Methods
Public methods
+ inherited public methods from Inference
Inference$capabilities()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_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$initialize()Inference$is_nonestimable()Inference$set_optimization_alg()Inference$set_seed()Inference$supports()
Examples
# \donttest{
seq_des = DesignSeqOneByOneKK14$new(n = 10, response_type = 'continuous')
for (i in 1:10) {
seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1), x2 = rnorm(1)))
}
seq_des$add_all_subject_responses(rnorm(10))
inf = InferenceBaiAdjustedTKK21$new(seq_des)
inf$compute_estimate()
#> [1] -0.7900056
# }