
Partial Proportional-Odds Regression Inference for Ordinal Responses
Source:R/inference_ordinal_partial_proportional_odds.R
InferenceOrdinalPartialProportionalOddsRegr.RdFits a partial proportional-odds cumulative-logit model
for an ordinal response: a subset of covariates named in nonparallel
are allowed a separate coefficient at each cumulative threshold (relaxing the
proportional-odds/parallel-lines assumption for exactly those covariates),
while every other covariate — including the treatment indicator,
which is always fit as a parallel (proportional) term regardless of
nonparallel — keeps one shared coefficient across all thresholds. The
reported treatment effect is therefore always a single proportional
(threshold-invariant) log-odds shift, even when other covariates' effects
are allowed to vary by threshold. When nonparallel is empty, fitting
uses this package's fast Rcpp full-proportional-odds solver
(fast_ordinal_regression_with_var_cpp); otherwise it falls back,
in order, to VGAM::vglm(family = VGAM::cumulative(parallel = ...)),
ordinal::clm(nominal = ...), and (only when nonparallel is
empty and the earlier fast/VGAM/clm attempts failed) MASS::polr. Each
fallback requires its corresponding package to be installed; unavailable
packages are silently skipped in favor of the next fallback.
Details
Information source of the Wald standard error. The Wald standard
error, p-value and confidence interval always use the observed
information (the negative Hessian of the log-likelihood at the estimate;
Efron and Hinkley, 1978), whichever backend fitted: the fast solver and
ordinal::clm report it directly, and for a VGAM::vglm fit
(whose own covariance is the expected information from Fisher
scoring) it is computed analytically at VGAM's estimate. The estimate is
VGAM's either way. Before v1.0.6 the VGAM path reported VGAM's
expected-information standard error; on simulated data (40 data sets per
\(n\), one nonparallel covariate, four categories) the
observed-information treatment SE differs from it by a median of
0.1–0.8% (at most 5.7%) at \(n = 40\)–\(60\), 0.3% (at most
1.6%) at \(n = 100\) and 0.2% (at most 0.9%) at \(n = 300\), with
every estimate unchanged. If the observed information at
VGAM's estimate is not positive definite (VGAM did not stop at a maximum of
the likelihood), the VGAM fit has no standard error and the cascade moves
on to ordinal::clm for the estimate and its (observed-information)
standard error; the expected information is never used as a substitute.
Bootstrap-weighted refits report no standard error on any backend.
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 | subjects | regular | theory | [Fisher1935], [LehmannRomano2005] |
wald | asymptotic | \(O(n_{eff}^{-1})\) | subjects | regular | assumed default | [Hall1992] |
jackknife | asymptotic | \(O(n_{eff}^{-1})\) | subjects | regular | assumed default | [ShaoTu1995] |
bootstrap | asymptotic | \(O(n_{eff}^{-1})\) | subjects | regular | assumed default | [Hall1992] |
bayes_boot | asymptotic | \(O(n_{eff}^{-1})\) | subjects | regular | assumed default | [Rubin1981], [Lo1987] |
rand_bootstrap | asymptotic | \(O(n_{eff}^{-1})\) | subjects | 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.
Design-specific differences from the table:
On any design with unequal allocation (
prob_Tnot 0.5), forwald,jackknife,bootstrap,bayes_boot,rand_bootstrap: the effective n is the size of the smaller arm.On
DesignFixedBlockedCluster,DesignFixedCluster, forwald,jackknife,bootstrap,bayes_boot,rand_bootstrap: the effective n is the number of clusters.
Blocking designs
On a blocking design
(DesignFixedBlocking and relatives)
the regression-type inference classes do not add block fixed effects
(or block-by-treatment interactions) automatically: the model uses only the
covariate matrix. Whether the blocks enter the regression therefore depends
on how they were supplied: not at all with m=; as dummies when the
blocking column is a factor/character (or few-level integer) covariate; as a
single linear term when it is numeric. Randomization, bootstrap and
jackknife inference are block-aware regardless; only the model-based
(asymptotic, likelihood) path ignores the blocks.
When the proportion treated is the same in every block, the pooled
treatment estimate of a linear model is unbiased and its model-based SE is
conservative (it is inflated by the block variation it fails to remove), at a
cost in power. If the proportion treated differs across blocks (for example
equal_block_sizes = FALSE with very small blocks and an extreme
prob_T, where per-block rounding changes the allocation, or a
user-supplied m), the pooled treated-vs-control comparison is
confounded by block (Simpson's paradox) and can be biased; then include the
blocking covariate(s) explicitly as factor covariates. For non-linear models
(GLM, ordinal, survival) omitting blocks changes the estimand to a
block-marginal effect. See DesignFixedBlocking.
References
Efron, B., and Hinkley, D. V. (1978). "Assessing the Accuracy
of the Maximum Likelihood Estimator: Observed Versus Expected Fisher
Information." Biometrika, 65(3), 457-483,
doi:10.1093/biomet/65.3.457
, for the observed-information standard
error. Peterson, B., and Harrell, F. E. (1990). "Partial Proportional
Odds Models for Ordinal Response Variables." Journal of the Royal
Statistical Society, Series C (Applied Statistics), 39(2), 205-217,
doi:10.2307/2347760
, for the partial (non-parallel-covariate)
proportional-odds model fit here. McCullagh, P. (1980). "Regression
Models for Ordinal Data." Journal of the Royal Statistical
Society, Series B, 42(2), 109-127,
doi:10.1111/j.2517-6161.1980.tb01109.x
, for the full proportional-odds
model this generalizes (see
InferenceOrdinalPropOddsRegr).
[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).
Super class
Inference -> InferenceOrdinalPartialProportionalOddsRegr
Methods
Public methods
InferenceOrdinalPartialProportionalOddsRegr$compute_estimate()InferenceOrdinalPartialProportionalOddsRegr$compute_estimate_with_bootstrap_weights()InferenceOrdinalPartialProportionalOddsRegr$compute_asymp_confidence_interval()InferenceOrdinalPartialProportionalOddsRegr$compute_asymp_two_sided_pval()InferenceOrdinalPartialProportionalOddsRegr$compute_wald_confidence_interval()InferenceOrdinalPartialProportionalOddsRegr$compute_wald_two_sided_pval()InferenceOrdinalPartialProportionalOddsRegr$benchmark_asymp_two_sided_pval_breakdown()
+ 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()
InferenceOrdinalPartialProportionalOddsRegr$new()
Uses the shared randomization two-sided p-value contract; see
InferenceRand.
Initialize partial proportional-odds ordinal regression inference for a completed design with an ordinal, uncensored response.
Usage
InferenceOrdinalPartialProportionalOddsRegr$new(
des_obj,
verbose = FALSE,
harden = TRUE,
model_formula = NULL,
nonparallel = character(0),
smart_cold_start_default = NULL
)Arguments
des_objA completed
DesignSeqOneByOneobject with an ordinal response.verboseWhether to print progress messages.
hardenWhether to apply robustness measures.
model_formulaOptional formula for covariate adjustment. If
NULL(default), the formula from the design object is used and its pre-computed design matrix is reused. If a formula is provided, a new design matrix is constructed from the design's imputed covariates.nonparallelNames of covariates (not including
"treatment", which is always fit as a parallel/proportional term) allowed a separate coefficient at each cumulative threshold, relaxing the proportional-odds assumption for those covariates specifically.smart_cold_start_defaultWhether to use smart cold start values by default.
InferenceOrdinalPartialProportionalOddsRegr$compute_estimate()
Retrieves the estimated (always-parallel) treatment log-odds shift from the partial proportional-odds fit (see class documentation for the fitting backend cascade).
InferenceOrdinalPartialProportionalOddsRegr$compute_estimate_with_bootstrap_weights()
Recomputes the partial-proportional-odds treatment estimate
under subject/block bootstrap weights, used by the Bayesian bootstrap
and related weighted-resampling machinery. If the weights are
effectively constant, short-circuits to the unweighted
$compute_estimate(estimate_only = TRUE). Otherwise refits with
weights via the same backend cascade as the unweighted fit
(VGAM/ordinal/MASS::polr, each weighted), and if
all of those fail, falls back further to a plain weighted
binary-logistic surrogate fit
(weighted_ordinal_bootstrap_surrogate_fit(..., method =
"logistic")) that does not model the ordinal structure at all. Never
computes a standard error on any weighted path (s_beta_hat_T is
always NA), regardless of estimate_only.
InferenceOrdinalPartialProportionalOddsRegr$compute_asymp_confidence_interval()
Computes a Wald-style confidence interval for the
treatment log-odds shift, using the model-based standard error
from whichever backend (fast Rcpp solver, VGAM,
ordinal, or MASS::polr) successfully fit the
unweighted model (see class documentation). If that standard
error is unavailable (NA, non-finite, or 0) — e.g. because
the fit succeeded via a fallback path that doesn't report one —
the interval is explicitly marked non-estimable
(c(NA, NA)) when private$harden is TRUE, or
raises an error otherwise, rather than silently returning a
misleading result. Identical to $compute_wald_confidence_interval().
InferenceOrdinalPartialProportionalOddsRegr$compute_asymp_two_sided_pval()
Computes a Wald-style two-sided p-value testing
\(H_0: \beta_T = \code{delta}\), using the same model-based
standard error as $compute_asymp_confidence_interval(); if
unavailable, marked non-estimable (NA) or an error is
raised, per private$harden — see that method's
documentation. Identical to $compute_wald_two_sided_pval().
InferenceOrdinalPartialProportionalOddsRegr$compute_wald_confidence_interval()
Identical to $compute_asymp_confidence_interval();
provided as an explicit alias for callers that want to name the
Wald method directly rather than via the generic "asymptotic"
dispatch.
InferenceOrdinalPartialProportionalOddsRegr$compute_wald_two_sided_pval()
Identical to $compute_asymp_two_sided_pval();
provided as an explicit alias for callers that want to name the
Wald method directly rather than via the generic "asymptotic"
dispatch.
InferenceOrdinalPartialProportionalOddsRegr$benchmark_asymp_two_sided_pval_breakdown()
Diagnostic helper for performance investigation: runs the
same computation as $compute_asymp_two_sided_pval() (fit the
partial proportional-odds model requiring a standard error, cache the
estimate/SE/df, compute the two-sided Wald p-value) but separately
times each of the three stages — model fit, cache materialization, and
final p-value arithmetic — via proc.time(). If the fit fails or
has no usable standard error, returns immediately with only
fit_time populated and every other timing/result field
NA.