sojourn.msm {msm} | R Documentation |
Estimate the mean sojourn times in the transient states of a multi-state model and their confidence limits.
sojourn.msm(x, covariates="mean", ci=c("delta","normal","bootstrap","none"), cl=0.95, B=1000)
x |
A fitted multi-state model, as returned by msm |
covariates |
The covariate values at which to estimate the mean sojourn times. This can either be:
the string
the number a list of values, with optional names. For example,
|
ci |
If "delta" (the default) then confidence intervals are
calculated by the delta method, or by simple transformation of the
Hessian in the very simplest cases.
If
If |
cl |
Width of the symmetric confidence interval to present. Defaults to 0.95. |
B |
Number of bootstrap replicates, or number of normal simulations from the distribution of the MLEs |
The mean sojourn time in a transient state r is estimated by
- 1 / q_{rr}, where q_{rr} is the rth entry on the diagonal
of the estimated transition intensity matrix. Calls
deltamethod
to find approximate standard errors.
Confidence limits are estimated by assuming normality on the log
scale.
A data frame with components:
estimates |
Estimated mean sojourn times in the transient states. |
SE |
Corresponding standard errors. |
L |
Lower confidence limits. |
U |
Upper confidence limits. |
C. H. Jackson chris.jackson@mrc-bsu.cam.ac.uk