Skip to contents

Fits 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.

ProcedureRegimeError orderEffective nRegularityBasisReferences
randfinite sampleexactpairs + reservoirregulartheory[Fisher1935], [LehmannRomano2005]
waldasymptotic\(O(n_{eff}^{-1})\)pairs + reservoirregularassumed default[Hall1992]
jackknifeasymptotic\(O(n_{eff}^{-1})\)pairs + reservoirregularassumed default[ShaoTu1995]
bootstrapasymptotic\(O(n_{eff}^{-1})\)pairs + reservoirregularassumed default[Hall1992]
bayes_bootasymptotic\(O(n_{eff}^{-1})\)pairs + reservoirregularassumed default[Rubin1981], [Lo1987]
rand_bootstrapasymptotic\(O(n_{eff}^{-1})\)pairs + reservoirregularassumed 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

+ inherited public methods from Inference


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
)

Arguments

des_obj

A completed KK DesignSeqOneByOne object with an ordinal response.

verbose

Flag for progress messages.

harden

Whether to apply robustness measures.

model_formula

Optional formula for covariate adjustment.

smart_cold_start_default

Whether to use smart cold start values by default.


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\).

Usage

InferenceOrdinalKKCondAdjCatLogitRegr$compute_estimate(estimate_only = FALSE)

Arguments

estimate_only

If TRUE, skip standard-error computation and cache only the point estimate; used by randomization and bootstrap resampling paths.


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.

Usage

InferenceOrdinalKKCondAdjCatLogitRegr$compute_estimate_with_bootstrap_weights(
  subject_or_block_weights,
  estimate_only = FALSE
)

Arguments

subject_or_block_weights

Subject-, block-, cluster-, or matched-set bootstrap weights.

estimate_only

If TRUE, compute only the weighted point estimate.


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.

Usage

InferenceOrdinalKKCondAdjCatLogitRegr$compute_asymp_confidence_interval(
  alpha = 0.05
)

Arguments

alpha

Two-sided miscoverage rate; the returned interval targets 1 - alpha coverage.


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.

Usage

InferenceOrdinalKKCondAdjCatLogitRegr$compute_asymp_two_sided_pval(delta = 0)

Arguments

delta

Null hypothesis treatment effect.


InferenceOrdinalKKCondAdjCatLogitRegr$clone()

The objects of this class are cloneable with this method.

Usage

InferenceOrdinalKKCondAdjCatLogitRegr$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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