Learn R Programming

msm (version 0.7.6)

pmatrix.msm: Transition probability matrix

Description

Extract the estimated transition probability matrix from a fitted multi-state model for a given time interval, at a given set of covariate values.

Usage

pmatrix.msm(x, t=1, covariates="mean", ci=c("none","normal","bootstrap"), cl=0.95, B=1000)

Arguments

x
A fitted multi-state model, as returned by msm.
t
The time interval to estimate the transition probabilities for, by default one unit.
covariates
The covariate values at which to estimate the transition probabilities. This can either be: the string "mean", denoting the means of the covariates in the data (this is the default), the number 0, indicating that all the
ci
If "normal", then calculate a confidence interval for the transition probabilities by simulating B random vectors from the asymptotic multivariate normal distribution implied by the maximum likelihood estimates (and c
cl
Width of the symmetric confidence interval, relative to 1.
B
Number of bootstrap replicates, or number of normal simulations from the distribution of the MLEs

Value

  • The matrix of estimated transition probabilities $P(t)$ in the given time. Rows correspond to "from-state" and columns to "to-state".

    Or if ci="normal" or ci="bootstrap", pmatrix.msm returns a list with components estimates and ci, where estimates is the matrix of estimated transition probabilities, and ci is a list of two matrices containing the upper and lower confidence limits.

Details

For a continuous-time homogeneous Markov process with transition intensity matrix $Q$, the probability of occupying state $s$ at time $u + t$ conditionally on occupying state $r$ at time $u$ is given by the $(r,s)$ entry of the matrix $P(t) = \exp(tQ)$.

For non-homogeneous processes, where covariates and hence the transition intensity matrix are time-dependent, but are piecewise-constant within the time interval [u, u+t], the function pmatrix.piecewise.msm can be used.

See Also

qmatrix.msm, pmatrix.piecewise.msm, boot.msm