soprobMarkovOrdm | R Documentation |
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
)
object |
a fit object created by |
data |
a single observation list or data frame with covariate settings, including the initial state for Y |
times |
vector of measurement times |
ylevels |
a vector of ordered levels of the outcome variable (numeric or character) |
absorb |
vector of absorbing states, a subset of |
tvarname |
name of time variable, defaulting to |
pvarname |
name of previous state variable, defaulting to |
gap |
name of time gap variable, defaults assuming that gap time is not in the model |
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.
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.
Frank Harrell
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.