qmatrix.msm {msm} | R Documentation |
Extract the estimated transition intensity matrix, and the corresponding standard errors, from a fitted multi-state model at a given set of covariate values.
qmatrix.msm(x, covariates="mean", sojourn=FALSE, cl=0.95)
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 covariates should be
set to zero,or a list of values, with optional names. For example list (60, 1)
where the order of the list follows the order of the covariates originally given in the model formula, or a named list, list (age = 60, sex = 1)
|
sojourn |
Set to TRUE if the estimated sojourn times and their standard errors should also be returned. |
cl |
Width of the symmetric confidence interval to present. Defaults to 0.95. |
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.
A list with components:
estimate |
Estimated transition intensity matrix. |
SE |
Corresponding approximate standard errors. |
L |
Lower confidence limits |
U |
Upper confidence limits |
If sojourn
is TRUE
, extra components called
sojourn
and sojournSE
are included, containing the
estimate and standard errors, 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")]
C. H. Jackson chris.jackson@imperial.ac.uk
pmatrix.msm
, sojourn.msm
,
deltamethod
, ematrix.msm