
Conditional Logistic Plus Reservoir Logistic Inference for KK Designs
Source:R/inference_incidence_KK_cond_logit_glmm.R
InferenceIncidKKCondLogitGLMMOneLik.RdFits one likelihood for an incidence response under a KK matching-on-the-fly design, made of two parts that share the treatment coefficient \(\beta_T\) and the covariate coefficients \(\beta_x\):
Discordant matched pairs: conditional logit, \(P(\mathrm{treated\ member\ is\ the\ success}) = \mathrm{logistic}(\beta_T + \beta_x^\top(x_T - x_C))\). The pair's own intercept cancels. Concordant pairs carry no information under this model and are left out.
Reservoir (unmatched) subjects: ordinary logistic regression, \(\mathrm{logit}\,P(y = 1) = \alpha + \beta_T w + \beta_x^\top x\), with its own intercept \(\alpha\) (
private$combine_reservoir_into_glmm() == TRUE).
The two parts are independent (disjoint subjects; KK matching depends on
covariates, not on a subject's own outcome), so their log-likelihoods add.
The joint maximum is one logistic regression on stacked rows, and Wald,
score, gradient and likelihood-ratio inference use its ordinary
information. When the reservoir's outcomes do not vary, its intercept
estimate is infinite and it carries no information about the coefficients,
so it is left out and the fit is conditional logit alone. With
DesignFixedBinaryMatch (no reservoir) this class equals
InferenceIncidKKCondLogitGLMMIVWC.
Caveat: two estimands are pooled. Conditional logit estimates a pair-conditional log odds ratio. Logistic regression on the reservoir estimates a log odds ratio given only the modeled covariates. Because the odds ratio is non-collapsible, these are the same number only if the linear logistic model in \(x\) is correct, i.e. no outcome-relevant variation is left between pairs beyond what \(\beta_x^\top x\) explains. With residual pair-level heterogeneity of standard deviation \(\sigma\), the reservoir's coefficient is attenuated toward zero, roughly \(\beta_{cond} / \sqrt{1 + 0.35\sigma^2}\) (Zeger, Liang and Albert, 1988). The joint estimate is then a precision-weighted mix of two different estimands. The test of no treatment effect is unaffected: under \(H_0: \beta_T = 0\) with randomized treatment both parts are centred at zero even when the logistic model in \(x\) is wrong. KK reservoir subjects are the ones that found no close match, so they tend to lie in sparse regions of \(x\), where a linear logistic model is most likely to be wrong. The reservoir is usually a small share of \(n\), so its weight in the pooled estimate is usually small.
Up to v1.0.4 the concordant pairs (and, for the OneLik variant, the
reservoir) entered a random-intercept logistic GLMM. Concordant pairs agree
on outcome by definition, so with pairs grouped correctly the
random-intercept variance estimate diverges, the GLMM term stops depending
on the coefficients, and the fit reduces to conditional logit (it was often
reported nonestimable at the variance bound). Under a free pair effect a
concordant pair's conditional likelihood is 1, so dropping them loses no
information. The class name is kept for compatibility; max_abs_log_sigma
is accepted but unused.
See InferenceAbstractKKCondLogitGLMM's
known estimability limitation at high covariate counts, which applies
here too.
Small-sample behaviour
How fast the size (and coverage) error of each procedure is expected to vanish as the
effective sample size \(n_{eff}\) grows, from EDI's convergence-rate registry
(inference_convergence_expectation()). Exact procedures are valid at every
n by construction; the others are asymptotic, so a small-sample excess is expected, and
its constant is not given by an order. The table is the expectation for a balanced
complete-randomization design; it is not a measured size. Reference keys are explained
under References.
| Procedure | Regime | Error order | Effective n | Regularity | Basis | References |
rand | finite sample | exact | pairs + reservoir | regular | theory | [Fisher1935], [LehmannRomano2005] |
wald | asymptotic | \(O(n_{eff}^{-1})\) | pairs + reservoir | regular | assumed default | [Hall1992] |
jackknife | asymptotic | \(O(n_{eff}^{-1})\) | pairs + reservoir | regular | assumed default | [ShaoTu1995] |
score | asymptotic | \(O(n_{eff}^{-1})\) | pairs + reservoir | regular | assumed default | [BarndorffNielsenCox1994] |
lik_ratio | asymptotic | \(O(n_{eff}^{-1})\) | pairs + reservoir | regular | assumed default | [BarndorffNielsenCox1994] |
gradient | asymptotic | \(O(n_{eff}^{-1})\) | pairs + reservoir | regular | assumed default | [Terrell2002], [Lemonte2016] |
lik_ratio_bartlett_approx | asymptotic | \(O(n_{eff}^{-2})\) | pairs + reservoir | regular | assumed default | [Lawley1956], [BarndorffNielsenHall1988] |
lik_ratio_bartlett_exact | asymptotic | \(O(n_{eff}^{-2})\) | pairs + reservoir | regular | assumed default | [Lawley1956], [BarndorffNielsenHall1988] |
bootstrap | asymptotic | \(O(n_{eff}^{-1})\) | pairs + reservoir | regular | assumed default | [Hall1992] |
bayes_boot | asymptotic | \(O(n_{eff}^{-1})\) | pairs + reservoir | regular | assumed default | [Rubin1981], [Lo1987] |
rand_bootstrap | asymptotic | \(O(n_{eff}^{-1})\) | pairs + reservoir | regular | assumed default | [Hall1992], [Kallus2018] |
The point estimate's bias is of order \(O(n_{eff}^{-1})\) (assumed default: [CoxSnell1968]).
Rows with basis assumed default: the order shown is the procedure's rate in a regular parametric model, and the cited works establish it for that case only. EDI has not derived it for this class.
The procedure list is by declared capability; an object can still report a procedure
(for example a Bartlett correction) as unavailable through get_supported_testing_types().
References
Zeger, S. L., Liang, K.-Y. and Albert, P. S. (1988). Models for longitudinal data: a generalized estimating equation approach. Biometrics, 44(4), 1049–1060.
[Fisher1935] Fisher, R. A. (1935). The Design of Experiments. Oliver and Boyd.
[LehmannRomano2005] Lehmann, E. L., and Romano, J. P. (2005). Testing Statistical Hypotheses (3rd ed.). Springer.
[Hall1992] Hall, P. (1992). The Bootstrap and Edgeworth Expansion. Springer.
[ShaoTu1995] Shao, J., and Tu, D. (1995). The Jackknife and Bootstrap. Springer.
[BarndorffNielsenCox1994] Barndorff-Nielsen, O. E., and Cox, D. R. (1994). Inference and Asymptotics. Chapman and Hall.
[Terrell2002] Terrell, G. R. (2002). "The gradient statistic." Computing Science and Statistics, 34, 206-215.
[Lemonte2016] Lemonte, A. J. (2016). The Gradient Test: Another Likelihood-Based Test. Academic Press.
[Lawley1956] Lawley, D. N. (1956). "A General Method for Approximating to the Distribution of Likelihood Ratio Criteria." Biometrika, 43(3-4), 295-303.
[BarndorffNielsenHall1988] Barndorff-Nielsen, O. E., and Hall, P. (1988). "On the Level-Error after Bartlett Adjustment of the Likelihood Ratio Statistic." Biometrika, 75(2), 374-378.
[Rubin1981] Rubin, D. B. (1981). "The Bayesian Bootstrap." The Annals of Statistics, 9(1), 130-134.
[Lo1987] Lo, A. Y. (1987). "A Large Sample Study of the Bayesian Bootstrap." The Annals of Statistics, 15(1), 360-375.
[Kallus2018] Kallus, N. (2018). "Optimal a priori balance in the design of controlled experiments." Journal of the Royal Statistical Society: Series B, 80(1), 85-112. Section 5 ("Algorithms for inference"), Algorithm 4.
[CoxSnell1968] Cox, D. R., and Snell, E. J. (1968). "A General Definition of Residuals." Journal of the Royal Statistical Society: Series B, 30(2), 248-265 (discussion 265-275).
Super classes
Inference -> InferenceAbstractKKCondLogitGLMM -> InferenceIncidKKCondLogitGLMMOneLik
Methods
+ inherited public methods from InferenceAbstractKKCondLogitGLMM
InferenceAbstractKKCondLogitGLMM$approximate_bayesian_bootstrap_distribution_beta_hat_T()InferenceAbstractKKCondLogitGLMM$approximate_bootstrap_distribution_beta_hat_T()InferenceAbstractKKCondLogitGLMM$approximate_jackknife_distribution_beta_hat_T()InferenceAbstractKKCondLogitGLMM$approximate_m_out_of_n_bootstrap_distribution_beta_hat_T()InferenceAbstractKKCondLogitGLMM$approximate_rand_bootstrap_distribution_beta_hat_T()InferenceAbstractKKCondLogitGLMM$approximate_randomization_distribution_beta_hat_T()InferenceAbstractKKCondLogitGLMM$approximate_subsampling_distribution_beta_hat_T()InferenceAbstractKKCondLogitGLMM$compute_asymp_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_asymp_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_bayesian_bootstrap_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_bayesian_bootstrap_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_bootstrap_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_bootstrap_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_estimate()InferenceAbstractKKCondLogitGLMM$compute_estimate_with_bootstrap_weights()InferenceAbstractKKCondLogitGLMM$compute_gradient_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_gradient_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_jackknife_bias_estimate()InferenceAbstractKKCondLogitGLMM$compute_jackknife_estimate()InferenceAbstractKKCondLogitGLMM$compute_jackknife_std_error()InferenceAbstractKKCondLogitGLMM$compute_jackknife_wald_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_jackknife_wald_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_bartlett_approx_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_bartlett_approx_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_bartlett_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_bartlett_exact_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_bartlett_exact_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_bartlett_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_bootstrap_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_bootstrap_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_lik_ratio_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_m_out_of_n_bootstrap_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_m_out_of_n_bootstrap_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_param_bootstrap_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_param_bootstrap_estimate()InferenceAbstractKKCondLogitGLMM$compute_param_bootstrap_pval()InferenceAbstractKKCondLogitGLMM$compute_rand_bootstrap_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_rand_bootstrap_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_rand_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_rand_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_score_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_score_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_subsampling_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_subsampling_sensitivity()InferenceAbstractKKCondLogitGLMM$compute_subsampling_two_sided_pval()InferenceAbstractKKCondLogitGLMM$compute_wald_confidence_interval()InferenceAbstractKKCondLogitGLMM$compute_wald_two_sided_pval()InferenceAbstractKKCondLogitGLMM$get_information_preference()InferenceAbstractKKCondLogitGLMM$get_information_source_used()InferenceAbstractKKCondLogitGLMM$get_last_param_bootstrap_diagnostics()InferenceAbstractKKCondLogitGLMM$get_last_param_bootstrap_estimate_diagnostics()InferenceAbstractKKCondLogitGLMM$get_mod()InferenceAbstractKKCondLogitGLMM$get_supported_bayesian_bootstrap_ci_types()InferenceAbstractKKCondLogitGLMM$get_supported_bayesian_bootstrap_pval_types()InferenceAbstractKKCondLogitGLMM$get_supported_bootstrap_ci_types()InferenceAbstractKKCondLogitGLMM$get_supported_bootstrap_pval_types()InferenceAbstractKKCondLogitGLMM$get_supported_information_preferences()InferenceAbstractKKCondLogitGLMM$get_supported_rand_bootstrap_ci_types()InferenceAbstractKKCondLogitGLMM$get_supported_rand_bootstrap_pval_types()InferenceAbstractKKCondLogitGLMM$get_supported_testing_types()InferenceAbstractKKCondLogitGLMM$get_testing_type()InferenceAbstractKKCondLogitGLMM$select_optimal_b_subsampling()InferenceAbstractKKCondLogitGLMM$select_optimal_m_out_of_n_bootstrap()InferenceAbstractKKCondLogitGLMM$set_information_preference()InferenceAbstractKKCondLogitGLMM$set_testing_type()InferenceAbstractKKCondLogitGLMM$supports_rand_pval_for_incidence()+ 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()
InferenceIncidKKCondLogitGLMMOneLik$new()
Initialize inference for the conditional-logit
(discordant matched pairs) plus logistic-regression (reservoir
subjects) incidence model; see
InferenceIncidKKCondLogitGLMMOneLik
for the model form. Does not fit the model; the fit is deferred to the
first call to compute_estimate() or a method that requires it.
Usage
InferenceIncidKKCondLogitGLMMOneLik$new(
des_obj,
model_formula = NULL,
max_abs_reasonable_coef = 50,
max_abs_reasonable_se = 1.25,
max_abs_log_sigma = 8,
verbose = FALSE,
smart_cold_start_default = NULL,
optimization_alg = NULL
)Arguments
des_objA completed
Designobject with an incidence 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_sigmaUnused since v1.0.5 (the model has no random effect); accepted for compatibility.
verboseWhether to print progress messages.
smart_cold_start_defaultWhether to use smart optimizer start values.
optimization_algCharacter. Optimization algorithm (default "lbfgs").
Examples
seq_des = DesignSeqOneByOneKK14$new(n = 30, response_type = 'incidence')
# \donttest{
for (i in 1:30) {
seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1), x2 = rnorm(1)))
}
seq_des$add_all_subject_responses(rbinom(30, 1, 0.5))
inf = InferenceIncidKKCondLogitGLMMOneLik$new(seq_des)
inf$compute_estimate()
#> [1] 0.6498417
# }