marginal_predict: Marginal Predictions for Multivariate Ordinal Regression...

View source: R/predict.R

marginal_predictR Documentation

Marginal Predictions for Multivariate Ordinal Regression Models.

Description

Obtains marginal predictions/fitted measures for objects of class 'mvord'.

Usage

marginal_predict(
  object,
  newdata = NULL,
  type = NULL,
  subjectID = NULL,
  newoffset = NULL,
  ...
)

Arguments

object

an object of class 'mvord'.

newdata

(optional) data frame of new covariates and new responses. The names of the variables should correspond to the names of the variables used to fit the model. By default the data on which the model was estimated is considered.

type

types "prob", "class", "linpred", "cum.prob", "all.prob" are available.

subjectID

(optional) vector specifying for which subjectIDs the predictions
or fitted values should be computed.

newoffset

(optional) list of length equal to the number of outcomes, each element containing a vector of offsets to be considered.

...

further arguments passed to or from other methods.

Details

The following types can be chosen in marginal_predict:

type description
"prob" predicted marginal probabilities for the observed response categories. Used as default if newdata contains column(s) for response variable(s).
"class" predicted marginal classes of the observed responses.
"linpred" predicted linear predictor
"cum.prob" predicted marginal cumulative probabilities for the observed response categories.
"all.prob" predicted marginal probabilities for all ordered classes of each response. Used as default if newdata contains no column(s) for response variable(s).

If provided, the row names of the output correspond to the subjectIDs, otherwise they correspond to the row id of the observations.

See Also

predict.mvord, joint_probabilities


mvord documentation built on Sept. 11, 2024, 7:21 p.m.