State Occupancy Probabilities for First-Order Markov Ordinal Model from a Model Fit
soprobMarkovOrdm(
object,
data,
times,
ylevels,
absorb = NULL,
tvarname = "time",
pvarname = "yprev",
gap = NULL
)
if object
was not a Bayesian model, a matrix with rows corresponding to times and columns corresponding to states, with values equal to exact state occupancy probabilities. If object
was created by blrm
, the result is a 3-dimensional array with the posterior draws as the first dimension.
a fit object created by blrm
, lrm
, orm
, VGAM::vglm()
, or VGAM::vgam()
a single observation list or data frame with covariate settings, including the initial state for Y
vector of measurement times
a vector of ordered levels of the outcome variable (numeric or character)
vector of absorbing states, a subset of ylevels
. The default is no absorbing states. (numeric, character, factor)
name of time variable, defaulting to time
name of previous state variable, defaulting to yprev
name of time gap variable, defaults assuming that gap time is not in the model
Frank Harrell
Computes state occupancy probabilities for a single setting of baseline covariates. If the model fit was from rms::blrm()
, these probabilities are from all the posterior draws of the basic model parameters. Otherwise they are maximum likelihood point estimates.