name: op-reg-ordinal
description: REG_ORDINAL — ordinal (proportional-odds) regression of an ordered response, MASS::polr's model, logit / probit / cloglog; thresholds, Brant and nominal tests, weights, refusals. Always buffered.
kind: operator
category: REG
operator: REG_ORDINAL
type: reference
applies_to: process, compose, predict
examples_tags: [regression, ordinal]
Fits P(Y ≤ k | x) = F(ζ_k − xᵀβ) (polr): one coefficient per predictor shifts every threshold alike.
Use when
Fits a model that predicts an ordered rating (poor, fair, good) from numeric predictors, each shifting the whole scale up or down.
Questions it answers:
- Which customer traits are associated with a higher satisfaction rating, holding the others fixed?
- How much more likely is a top rating per extra year of tenure?
Use something else:
REG_GLMwhen the outcome has only two values (yes/no).
Params
link / levels / brant / nominal_test sit under params; shared keys: regression-spec.
| Name | Type | Default | Description |
|---|---|---|---|
target | field | (required) | Categorical or numeric, 3 to 100 levels. |
predictors | []field | (required) | — |
link | enum | logit | logit, probit, cloglog. |
levels | array | — | Level order, lowest first. |
brant | object | — | {} adds outputs.brant; logit only. |
nominal_test | object | — | {} adds outputs.nominal_test; any link; not probability-weighted. |
conf_level | float | 0.95 | — |
vcov | bool | false | — |
covariance | object | — | hc0, hc1, cluster. |
exponentiate | bool | false | — |
margins | object | — | regression-margins. |
weight | slot weight | — | — |
multiplicity | object | — | Predictors’ p-values only. |
holdout | expr | — | Proper scores. |
resample | enum | — | op-reg-mod-resample. |
bootstrap_iters | int | 1000 | — |
jackknife_groups | int | — | — |
jackknife_by | field | — | — |
rng_seed | int | — | — |
selection | enum | — | op-reg-mod-selection. |
criterion | enum | — | aic, bic. |
order | object | — | — |
save | string | — | Model file (regression-row-scores). |
name | string | — | — |
Inputs
A categorical response reads its labels; a numeric one formats its values ("3", "2.5"). A row whose response levels omits is dropped, as is a null cluster. Too few / many levels, or a listed level no row carries: PROCESSING_REGRESSION_INSUFFICIENT_DATA, fails alone.
Output
coefficients: predictors and thresholds "<level>|<next>" (no intercept). p_values null on thresholds, Wald ci_*; deviance, null_deviance, pseudo_r2, two_log_lik / aic (none probability-weighted). outputs: link, levels, thresholds, fitted_probabilities (mean P per level), brant / nominal_test (omnibus, per-predictor terms). exponentiate adds exponentiated (e^β of predictors); margins: dP(level)/dx, "<level>:<term>".
Reading the output
coefficients.*: A predictor’s coefficient is the shift of the latent scale for a one-unit increase in it, holding the other predictors fixed: under the logit link the log odds ratio of a higher rather than a lower level, the same at every step of the scale. A threshold<level>|<next level>(listed in outputs.thresholds) is the cut point zeta between two adjacent levels, in P(Y <= level | x) = F(zeta - x’beta).std_errors.*: How much the coefficient or threshold would vary from sample to sample, from the inverse of the fitted (observed) information matrix.
Contract
- Types (
target):categorical_*,date,datetime,decimal128,f32,f64,packed_bool,u16,u32,u4,u64,u8; any other scalar type isPULSE_FIELD_TYPE_UNSUPPORTED. - Types (
predictor):date,datetime,decimal128,f32,f64,packed_bool,u16,u32,u4,u64,u8; any other scalar type isPULSE_FIELD_TYPE_UNSUPPORTED. - Weight: weighted under
frequencyandprobabilityweights. - Multiplicity: its own
multiplicityblock (an inherited one never reaches it) adds per-coefficientp_adjustedandsignificant_adjustedbeside the raw p; familiesrequest(default),compose(inside Compose). - Streaming: buffered only. Always buffered: the model fits over every admitted row.
Gotchas
- Dictionary order = import order, else
levels. - Small Brant / nominal p: an effect varies by step.
- Frequency weights = the
rep()expansion; probability weights followREG_GLM’s rule (w* = w·n_eff/Σw). - Refused, predict too (
PROCESSING_CONFIG,details.slot):penalty,collinearity,hc2/hc3/hac, top-levellink/family. resample/selectionrefits keep the full fit’s levels (replicate_empty_level); AIC / BIC k counts thresholds.- Separation:
PROCESSING_REGRESSION_NO_CONVERGE, fails alone. compare:lrt/wald, samelevels(regression-comparison).
See
regression-modeling · regression-spec · op-reg-glm · regression-inference · weighting