
Bai Adjusted-t Mean-Difference Inference for KK14 Designs
Source:R/inference_continuous_KK14_bai.R
InferenceBaiAdjustedTKK14.RdContinuous-response mean-difference inference for designs assigned by
DesignSeqOneByOneKK14 (the
Kapelner-Krieger 2014 sequential matching-on-the-fly design). 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; the full
formula, pair-distance definition, and confidence-interval/p-value
construction are shared with
InferenceBaiAdjustedTKK21.
The two leaves differ only in how pair distance is defined during matching:
this class (KK14) uses the plain squared Euclidean distance
\(\sum_j (x_{1j} - x_{2j})^2\) between candidate subjects' covariate
vectors, unlike KK21's covariate-weighted distance. Because the estimator
is closed-form, initialization does not use warm starts (there is no
iterative fit to warm-start).
Super class
Inference -> InferenceBaiAdjustedTKK14
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 = InferenceBaiAdjustedTKK14$new(seq_des)
inf$compute_estimate()
#> [1] 0.7589322
# }