Learn R Programming

msm (version 0.5.2)

sojourn.msm: Mean sojourn times from a multi-state model

Description

Estimate the mean sojourn times in the transient states of a multi-state model and their confidence limits.

Usage

sojourn.msm(x, covariates="mean", cl=0.95)

Arguments

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 "mean", denoting the means of the covariates in the data (this is the default), the number 0, indicating that all the covariates
cl
Width of the symmetric confidence interval to present. Defaults to 0.95.

Value

  • A data frame with components:
  • estimatesEstimated mean sojourn times in the transient states.
  • SECorresponding standard errors.
  • LLower confidence limits.
  • UUpper confidence limits.

Details

The mean sojourn time in a transient state $r$ is estimated by $- 1 / q_{rr}$, where $q_{rr}$ is the $r$th 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.

See Also

msm, qmatrix.msm, deltamethod