Sojourn probability in a state of a msmbayes model
Arguments
- draws
Object returned by
msmbayes
.- t
Time since state entry. A single time or a vector can be supplied.
- state
State of interest (A single integer)
- new_data
Data frame with covariate values to predict for
- method
Only applicable to phase-type models. Method for computing the matrix exponential involved in the phase-type sojourn distribution. See
pnphase
.
Value
A data frame with column posterior
giving the posterior
distribution for the probability of remaining in state
by time
t
since state entry, as an rvar
object. Other columns give
the time and any covariate values.
See qdf
for notes on the rvar
format.