
Adjacent Category Logit Inference for KK Matching-on-the-fly Designs
Source:R/inference_ordinal_KK_cond_adj_cat_logit.R
InferenceOrdinalKKCondAdjCatLogitRegr.RdFits a conditional (stratified) adjacent-category logit model for ordinal
responses under a KK matching-on-the-fly design:
$$\log\frac{\Pr(Y_i = j+1 \mid Y_i \in \{j, j+1\})}{\Pr(Y_i = j \mid Y_i
\in \{j, j+1\})} = \alpha_j + \beta_T W_i + X_i^\top \gamma,$$ for adjacent
category comparisons \(j = 1, \dots, K-1\), with cut-specific intercepts
\(\alpha_j\) and a treatment coefficient \(\beta_T\) constrained equal
across all cuts (the parallel/proportional adjacent-category assumption).
\(\exp(\hat\beta_T)\) is the common adjacent-category odds ratio. Fitting
proceeds by expand_adjacent_category_data_cpp's stacked-binary
expansion (each subject contributes a 0/1 row per adjacent cut they border,
stratified by matched pair) followed by conditional logistic regression on
the expanded data — the matched-pair identity becomes the conditioning
stratum, so the pair's shared nuisance intercept is conditioned out exactly
as in a single binary conditional-logit KK model, and reservoir (unmatched)
subjects each form their own singleton stratum. likelihood_tier =
"partial" (a conditional/partial likelihood, matched-set effects are
profiled out rather than estimated); supports_likelihood_tests() is
hard FALSE — only Wald inference is exposed, not likelihood-ratio,
score, or gradient tests. Validity requires the adjacent-category
proportionality assumption (a common \(\beta_T\) across all \(K-1\)
cuts) in addition to the usual conditional-logit exchangeability-within-strata
assumption induced by the KK design.
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] |
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.
References
Agresti, A. (2010). Analysis of Ordinal Categorical Data (2nd ed.). Wiley, for the adjacent-category logit model family; Kapelner, A. and Krieger, A. M. (2014). "Matching on-the-fly: Sequential allocation with higher power and efficiency." Biometrics, 70(2), 378-388, doi:10.1111/biom.12148 , for the KK matching-on-the-fly design this class is built for.
[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.
[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).
See also
InferenceOrdinalAdjCatLogitRegr
for the non-KK analog. See also:
Ordinal regression
(Wikipedia).
Super class
Inference -> InferenceOrdinalKKCondAdjCatLogitRegr
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()
InferenceOrdinalKKCondAdjCatLogitRegr$new()
Initialize inference for the conditional adjacent-category
logit model \(\log(\Pr(Y_i = j+1 \mid Y_i \in \{j,j+1\}) / \Pr(Y_i =
j \mid Y_i \in \{j,j+1\})) = \alpha_j + \beta_T W_i + X_i^\top \gamma\)
and prepare KK matched-pair structure for the stratified conditional-logit
fit. Does not fit the model; the fit is deferred to the first call to
compute_estimate() or a method that requires it.
Usage
InferenceOrdinalKKCondAdjCatLogitRegr$new(
des_obj,
verbose = FALSE,
harden = TRUE,
model_formula = NULL,
smart_cold_start_default = NULL
)InferenceOrdinalKKCondAdjCatLogitRegr$compute_estimate()
Fits the conditional adjacent-category logit model via
stacked-binary expansion (expand_adjacent_category_data_cpp)
plus conditional logistic regression, and returns the shared
log-odds-ratio estimate \(\hat\beta_T\).
InferenceOrdinalKKCondAdjCatLogitRegr$compute_estimate_with_bootstrap_weights()
Recomputes the treatment estimate under subject/block-level
bootstrap weights (Bayesian-bootstrap or nonparametric-bootstrap draw
weights, expanded to row level via
private$expand_subject_or_block_weights_to_row_weights()). When
weights are effectively constant, this collapses to the unweighted
compute_estimate() call. Otherwise, rather than refitting the
full expanded conditional-logit model under weights, it calls
weighted_ordinal_bootstrap_surrogate_fit() — a fast weighted
ordinal-logistic surrogate fit on the raw (unexpanded) design matrix —
as an approximation to the weighted adjacent-category likelihood; this
trades exact reweighted refitting for speed across many bootstrap
replicates. No standard error is computed (s_beta_hat_T is
always NA); the surrogate returns NA if the fit fails.
InferenceOrdinalKKCondAdjCatLogitRegr$compute_asymp_confidence_interval()
Wald confidence interval for the shared adjacent-category
log-odds-ratio \(\beta_T\), using the conditional-logit model's
standard error; see InferenceAsymp
for the shared Wald contract. Fits the model first if not already
cached.
InferenceOrdinalKKCondAdjCatLogitRegr$compute_asymp_two_sided_pval()
Return the adjacent-category conditional-logit asymptotic
p-value for the treatment coefficient, using the shared Wald semantics
documented in InferenceAsymp.
Examples
# \donttest{
seq_des = DesignSeqOneByOneKK14$new(n = 10, response_type = 'ordinal')
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(sample(1:4, 10, replace = TRUE))
inf = InferenceOrdinalKKCondAdjCatLogitRegr$new(seq_des)
inf$compute_estimate()
#> [1] NA
# }