Learn R Programming

mvord (version 1.2.5)

joint_probabilities: Fitted probabilities for multivariate ordinal regression models for given response categories.

Description

Extracts fitted probabilities for given combination of response categories from a fitted model of class 'mvord'.

Usage

joint_probabilities(
  object,
  response.cat,
  newdata = NULL,
  type = "prob",
  subjectID = NULL,
  newoffset = NULL,
  ...
)

Arguments

object

an object of class 'mvord'.

response.cat

vector or matrix with response categories (for each subject, one row of length equal to the number of multiple measurements).

newdata

(optional) data frame of new covariates. 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

"prob" for joint probabilities and "cum.prob" for joint cumulative probabilities.

subjectID

(optional) vector specifying for which subjectIDs the predictions
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 function provides a convenient way to extract probabilities for a given combination of response categories, given a set of covariates. The results obtained are the same as the ones by predict() with type = "prob" or type = "cum.prob". The difference is that in joint_probabilities(), for the same set of covariates, only the response.cat argument must be changed to obtain predictions for new classes. In predict(), one would need to reconstruct a new data frame newdata everytime a new response combination should be investigated.

From newdata only the columns corresponding to the covariates will be considered. Any columns corresponding to the responses will be ignored.

The row names of the output correspond to the subjectIDs.

See Also

predict.mvord, marginal_predict