Predict ordinal probabilities or outcome categories

# S3 method for class 'fastglm_ordinal'
predict(
  object,
  newdata = NULL,
  type = c("probability", "cumulative", "class", "link", "response"),
  se.fit = FALSE,
  offset = NULL,
  ...
)

Arguments

object

a fitted fastglm_ordinal model.

newdata

prediction data frame for a formula fit, or a matrix with the location columns used during matrix fitting. Defaults to the fitted design.

type

"probability" (or "response") returns category probabilities; "cumulative" returns probabilities through each category except the last; "class" returns the most probable ordered category; "link" returns the location predictor x beta + offset.

se.fit

include model-based delta-method standard errors. They are unavailable for class predictions or unconverged fits.

offset

optional replacement location offset.

...

further arguments; currently unused.

Value

A vector or matrix, or a fastglm_prediction list with fit, se.fit, and covariance.scope. See fastglm-prediction-methods for printing and table extraction.

Details

With collapsed empty interior categories, probability and cumulative uncertainty refer to the reduced category model. The removed category has fitted probability zero and unavailable probability standard error.