
Abstract Conditional Logistic GLMM Inference
Source:R/inference_incidence_KK_cond_logit_glmm_abstract.R
InferenceAbstractKKCondLogitGLMM.RdShared 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. SeeInferenceIncidKKCondLogitGLMMOneLikfor 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
Public methods
+ inherited public methods from Inference
Inference$capabilities()Inference$clear_randomization_cache()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_estimand()Inference$get_model_formula()Inference$get_nonestimable_reason()Inference$get_nonestimable_stage()Inference$get_optimization_alg()Inference$get_procedure_validity()Inference$get_response()Inference$get_response_type()Inference$get_summary()Inference$get_supported_estimands()Inference$get_treatment()Inference$is_nonestimable()Inference$set_estimand()Inference$set_optimization_alg()Inference$set_seed()Inference$supports()
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_objA completed
Designobject with an incidence or proportion response.model_formulaOptional formula for covariate adjustment.
max_abs_reasonable_coefCap for reasonable coefficient estimates.
max_abs_reasonable_seCap for reasonable treatment standard errors.
max_abs_log_sigmaCap for reasonable log random effect variance.
verboseLogical. Whether to print progress messages.
smart_cold_start_defaultLogical. Whether to use smart starting values for the optimizer.
optimization_algCharacter. Optimization algorithm (default "lbfgs").
InferenceAbstractKKCondLogitGLMM$compute_estimate()
Computes the class-specific treatment-effect estimate; see
Inference.
InferenceAbstractKKCondLogitGLMM$compute_estimate_with_bootstrap_weights()
Recomputes the class-specific treatment estimate for a bootstrap sample; see
InferenceNonParamBootstrap.
InferenceAbstractKKCondLogitGLMM$compute_asymp_confidence_interval()
Uses the shared asymptotic confidence-interval contract; see
InferenceAsymp.
InferenceAbstractKKCondLogitGLMM$compute_asymp_two_sided_pval()
Uses the shared asymptotic two-sided p-value contract; see
InferenceAsymp.