Extracts fitted probabilities for given combination of response categories from a fitted model of class 'mvord'
.
joint_probabilities(
object,
response.cat,
newdata = NULL,
type = "prob",
subjectID = NULL,
newoffset = NULL,
...
)
an object of class 'mvord'
.
vector or matrix with response categories (for each subject, one row of length equal to the number of multiple measurements).
(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.
"prob"
for joint probabilities and "cum.prob"
for joint cumulative probabilities.
(optional) vector specifying for which subjectIDs the predictions
should be computed.
(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.
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.
predict.mvord
, marginal_predict