Skip to contents

Shared base of the KK conditional-logit classes. The model depends on the response type:

  • Incidence (InferenceIncidKKCondLogitGLMMOneLik, InferenceIncidKKCondLogitGLMMIVWC; since v1.0.5): conditional logit on the discordant matched pairs plus, for OneLik, an ordinary logistic regression on the reservoir subjects, sharing the treatment and covariate coefficients. Concordant pairs are not used. See InferenceIncidKKCondLogitGLMMOneLik for the model and its caveat about pooling a pair-conditional and a covariate-conditional odds ratio.

  • Proportion (InferencePropKKGLMM): one likelihood with a conditional-logistic contribution from discordant matched pairs and a random-intercept logistic GLMM contribution from concordant matched pairs and reservoir subjects. A proportion pair is never exactly discordant, so in practice every subject enters the GLMM.

Known estimability limitation at high covariate counts. The treatment effect is identified from the discordant-pair conditional-logit term alone (the shared pair-level intercept cancels only for pairs that disagree on outcome), so that term alone must identify treatment plus every adjustment covariate from however many pairs happen to be discordant for a given incidence response, typically a modest fraction of \(n\). With model_formula = ~. on a dataset with many covariates, the number of free parameters the discordant term must help identify can approach or exceed the number of discordant pairs, and the joint fit then frequently converges to an out-of-bounds coefficient (or, for the proportion GLMM, random-effect log-variance) and is correctly reported as nonestimable rather than returned. This was measured directly (comprehensive_tests.R repro, 2026-10, with the pre-v1.0.5 GLMM model for incidence): the identical design/response/n was estimable in 39 of 40 null replicates with one covariate, but only 22 of 40 with ten covariates under model_formula = ~.. A covariate the design matched exactly (zero within-pair differences) is not identified by conditional logit; for incidence it is dropped from the fit rather than making the fit fail. This is treated as an accepted property of this estimator in this regime, not a defect to be patched; when the cause is specifically this parameter-to-discordant-pair imbalance, the cached nonestimability reason names it explicitly (joint_likelihood_nonestimable_high_dimensional_relative_to_discordant_pairs, with the actual counts) rather than the generic joint_likelihood_nonestimable that covers every other cause of the same two bound checks.

Super class

Inference -> InferenceAbstractKKCondLogitGLMM

Methods

+ inherited public methods from Inference


InferenceAbstractKKCondLogitGLMM$new()

Initialize KK conditional-logit inference for an incidence or proportion response and validate the design; the model (conditional logit plus reservoir logistic regression for incidence, conditional logit plus random-intercept GLMM for proportions) is fit on first use. See InferenceAbstractKKCondLogitGLMM.

Usage

InferenceAbstractKKCondLogitGLMM$new(
  des_obj,
  model_formula = NULL,
  max_abs_reasonable_coef = 50,
  max_abs_reasonable_se = 10,
  max_abs_log_sigma = 8,
  verbose = FALSE,
  smart_cold_start_default = NULL,
  optimization_alg = NULL
)

Arguments

des_obj

A completed Design object with an incidence or proportion response.

model_formula

Optional formula for covariate adjustment.

max_abs_reasonable_coef

Cap for reasonable coefficient estimates.

max_abs_reasonable_se

Cap for reasonable treatment standard errors.

max_abs_log_sigma

Cap for reasonable log random effect variance.

verbose

Logical. Whether to print progress messages.

smart_cold_start_default

Logical. Whether to use smart starting values for the optimizer.

optimization_alg

Character. Optimization algorithm (default "lbfgs").


InferenceAbstractKKCondLogitGLMM$compute_estimate()

Computes the class-specific treatment-effect estimate; see Inference.

Usage

InferenceAbstractKKCondLogitGLMM$compute_estimate(estimate_only = FALSE)

Arguments

estimate_only

Logical. If TRUE, skip variance component calculations.


InferenceAbstractKKCondLogitGLMM$compute_estimate_with_bootstrap_weights()

Recomputes the class-specific treatment estimate for a bootstrap sample; see InferenceNonParamBootstrap.

Usage

InferenceAbstractKKCondLogitGLMM$compute_estimate_with_bootstrap_weights(
  subject_or_block_weights,
  estimate_only = FALSE
)

Arguments

subject_or_block_weights

Numeric vector. Row weights for bootstrap.

estimate_only

Logical. If TRUE, skip variance component calculations.


InferenceAbstractKKCondLogitGLMM$compute_asymp_confidence_interval()

Uses the shared asymptotic confidence-interval contract; see InferenceAsymp.

Usage

InferenceAbstractKKCondLogitGLMM$compute_asymp_confidence_interval(
  alpha = 0.05
)

Arguments

alpha

Numeric. Significance level (default 0.05).


InferenceAbstractKKCondLogitGLMM$compute_asymp_two_sided_pval()

Uses the shared asymptotic two-sided p-value contract; see InferenceAsymp.

Usage

InferenceAbstractKKCondLogitGLMM$compute_asymp_two_sided_pval(delta = 0)

Arguments

delta

Numeric. Null treatment effect value (default 0).


InferenceAbstractKKCondLogitGLMM$clone()

The objects of this class are cloneable with this method.

Usage

InferenceAbstractKKCondLogitGLMM$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.