Skip to contents

Fits 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

+ inherited public methods from Inference


InferenceContinKKOLSIVWC$set_custom_randomization_statistic_function()

Usage

InferenceContinKKOLSIVWC$set_custom_randomization_statistic_function(
  custom_randomization_statistic_function
)


InferenceContinKKOLSIVWC$set_custom_randomization_statistic_cpp()

Usage

InferenceContinKKOLSIVWC$set_custom_randomization_statistic_cpp(fn)


InferenceContinKKOLSIVWC$approximate_randomization_distribution_beta_hat_T()

Usage

InferenceContinKKOLSIVWC$approximate_randomization_distribution_beta_hat_T(
  r = 501,
  delta = 0,
  transform_responses = "none",
  show_progress = TRUE,
  permutations = NULL,
  debug = FALSE,
  zero_one_logit_clamp = .Machine$double.eps
)


InferenceContinKKOLSIVWC$supports_rand_pval_for_incidence()

Usage

InferenceContinKKOLSIVWC$supports_rand_pval_for_incidence()


InferenceContinKKOLSIVWC$compute_rand_two_sided_pval()

Usage

InferenceContinKKOLSIVWC$compute_rand_two_sided_pval(
  r = 501,
  delta = 0,
  transform_responses = "none",
  na.rm = TRUE,
  show_progress = TRUE,
  permutations = NULL,
  zero_one_logit_clamp = .Machine$double.eps
)


InferenceContinKKOLSIVWC$clone()

The objects of this class are cloneable with this method.

Usage

InferenceContinKKOLSIVWC$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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
# }