R/ordinal-partial-methods.R
ordinal-partial-methods.RdPartial proportional-odds models allow selected predictor effects to differ across cumulative thresholds. The same parameter layout is available for probit and complementary log-log links, with interpretation on their link scales. Common slopes and threshold-specific slopes are displayed separately.
# S3 method for class 'fastglm_ordinal_partial'
coef(
object,
component = c("all", "location", "threshold", "common", "nonparallel"),
...
)
# S3 method for class 'fastglm_ordinal_partial'
vcov(
object,
component = c("all", "location", "threshold", "common", "nonparallel"),
type = c("model", "HC0", "HC1"),
cluster = NULL,
cadjust = TRUE,
block.size = 8192L,
...
)
# S3 method for class 'fastglm_ordinal_partial'
summary(object, vcov. = NULL, ...)
# S3 method for class 'summary.fastglm_ordinal_partial'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for class 'fastglm_ordinal_partial'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for class 'fastglm_ordinal_partial'
confint(
object,
parm,
level = 0.95,
method = c("wald", "profile"),
control = list(),
...
)
# S3 method for class 'fastglm_ordinal_partial'
predict(
object,
newdata = NULL,
type = c("probability", "cumulative", "class", "link", "response"),
se.fit = FALSE,
offset = NULL,
...
)
tidy.fastglm_ordinal_partial(
x,
conf.int = FALSE,
conf.level = 0.95,
exponentiate = FALSE,
component = c("all", "location", "threshold", "common", "nonparallel"),
vcov. = NULL,
...
)a fitted fastglm_ordinal_partial model, or its summary.
coefficient block: "all", "location" (all slopes),
"threshold", "common", or "nonparallel".
further method arguments.
for vcov(), "model" for inverse expected information, or
"HC0" or "HC1" for ordinary-score sandwich covariance. All thresholds
and both slope blocks enter the joint observed-information calculation.
For predict(), the scale: "probability" (or "response"),
"cumulative", "class", or "link". Nonparallel link predictions
are an observation-by-threshold matrix of cumulative predictors
alpha[j] - x_common beta - x_nonparallel gamma[,j] - offset.
Applying the inverse link gives the cumulative probabilities.
cluster identifiers, cluster adjustment,
and processing block size, as in fastglm_vcov(). Supplying cluster
requires type="HC0" or type="HC1". For mean-bias-reduced fits,
sandwich covariance uses the same first-order ordinary-score convention
and regularity assumptions described there. For a source fit, cluster
is a function of block index returning identifiers in original block row
order. Repeated identifiers may span source blocks.
optional full coefficient covariance for a converged fit.
number of significant digits used for display.
parameters by name or position; defaults to all parameters.
confidence level.
interval method: "wald" or, for maximum-likelihood fits
with retained data, "profile".
numerical controls for profile fitting, as described in
fastglm_score_test().
prediction data, as in predict.fastglm_ordinal().
include full-model delta-method standard errors.
optional replacement location offset.
include Wald confidence limits in broom::tidy() output.
confidence level for broom::tidy().
exponentiate slopes and their confidence limits. Odds-ratio interpretation applies to the logit link, with separate ratios for each threshold when a predictor has a nonparallel effect.
Coefficients, covariance, predictions, or a summary as appropriate. Printing invisibly returns the supplied object.
The coefficient vector contains thresholds, common slopes, and
threshold-specific slopes, in that order. Within the last block, all
selected predictors for the first threshold precede those for the second
threshold. object$gamma also stores these slopes as a predictor-by-threshold
matrix. Selecting component="location" includes both kinds of slope.
Thresholds describe the cumulative predictors when the covariates and offset equal zero. That covariate combination can lie outside the valid prediction domain, so the reported thresholds need not be ordered in isolation. The cumulative predictors are constrained to be ordered at positive-frequency training rows and checked again at prediction rows. Invalid predictions report the affected rows. Probability clipping or threshold reordering is not used to repair an invalid prediction.
Model-based covariance is inverse expected Fisher information, including
covariance between all thresholds and slopes. Wald intervals and
delta-method prediction standard errors are first-order approximations
under an interior correctly specified model with independent observations
or integer frequency counts and nonsingular limiting information.
Numerical convergence alone does not establish those assumptions.
With firth=TRUE, the full-model cumulative-link adjustment targets the
leading mean bias of the reported thresholds, common slopes, and
threshold-specific slopes. These adjusted equations do not generally
maximize a scalar penalized likelihood. Empty-category reductions require
additional parameter constraints and are not supported for these fits.