
OLS IVWC Compound Inference for KK Designs
Source:R/inference_continuous_KK_ols_ivwc.R
InferenceContinKKOLSIVWC.RdFits a variance-weighted compound estimator for KK matching-on-the-fly designs with continuous responses using OLS regression for matched-pair differences and reservoir outcomes, with the treatment indicator and, optionally, all recorded covariates as predictors. Note that warm starts are disabled for this class as OLS is a closed-form estimator and does not benefit from initialization.
Details
The point estimate \(\hat\beta_T\) is the inverse-variance-weighted
combination of an OLS fit on matched-pair within-pair differences and an
OLS fit on reservoir (unmatched) subjects' outcomes, falling back to
whichever sub-fit is usable if the other is not — the same compound
combination rule used by
InferenceAllKKMeanDiffIVWC,
generalized here to allow covariate adjustment via model_formula.
likelihood_tier = "none": this is an estimating-equation (least
squares) estimator, not a fitted likelihood, so only Wald-type asymptotic
inference is available (no likelihood-ratio or score test).
Legacy class. Not fully tested in comprehensive_tests.R.
Super class
Inference -> InferenceContinKKOLSIVWC
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 = InferenceContinKKOLSIVWC$new(seq_des)
inf$compute_estimate()
#> [1] -0.9682794
# }