Learn R Programming

msm (version 0.7.6)

qmatrix.msm: Transition intensity matrix

Description

Extract the estimated transition intensity matrix, and the corresponding standard errors, from a fitted multi-state model at a given set of covariate values.

Usage

qmatrix.msm(x, covariates="mean", sojourn=FALSE,
            ci=c("delta","normal","bootstrap","none"), cl=0.95, B=1000)

Arguments

x
A fitted multi-state model, as returned by msm
covariates
The covariate values at which to estimate the intensity matrix. 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 covaria
sojourn
Set to TRUE if the estimated sojourn times and their standard errors should also be returned.
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 "normal", then calculate a confidence interval by
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

Value

  • A list with components:
  • estimateEstimated transition intensity matrix.
  • SECorresponding approximate standard errors.
  • LLower confidence limits
  • UUpper confidence limits
  • Or if ci="none", then qmatrix.msm just returns the estimated transition intensity matrix. If sojourn is TRUE, extra components called sojourn, sojournSE, sojournL and sojournU are included, containing the estimates, standard errors and confidence limits, respectively, of the mean sojourn times in each transient state.

    The default print method for objects returned by qmatrix.msm presents estimates and confidence limits. To present estimates and standard errors, do something like

    qmatrix.msm(x)[c("estimates","SE")]

Details

Transition intensities and covariate effects are estimated on the log scale by msm. A covariance matrix is estimated from the Hessian of the maximised log-likelihood. The delta method is used to obtain from these the standard error of the intensities on the natural scale at arbitrary covariate values. Confidence limits are calculated by assuming normality on the log scale.

See Also

pmatrix.msm, sojourn.msm, deltamethod, ematrix.msm