plot.msm {msm} | R Documentation |
Plots of multi-state models
Description
This produces a plot of the expected probability of survival against time, from each transient state. Survival is defined as not entering an absorbing state.
Usage
## S3 method for class 'msm'
plot(
x,
from = NULL,
to = NULL,
range = NULL,
covariates = "mean",
legend.pos = NULL,
xlab = "Time",
ylab = "Fitted survival probability",
lwd = 1,
...
)
Arguments
x |
Output from |
from |
States from which to consider survival. Defaults to the complete set of transient states. |
to |
Absorbing state to consider. Defaults to the highest-labelled absorbing state. |
range |
Vector of two elements, giving the range of times to plot for. |
covariates |
Covariate values for which to evaluate the expected
probabilities. This can either be: the string the number or a list of values, with optional names. For example
where the order of the list follows the order of the covariates originally given in the model formula, or a named list,
|
legend.pos |
Vector of the |
xlab |
x axis label. |
ylab |
y axis label. |
lwd |
Line width. See |
... |
Other arguments to be passed to the generic |
Details
Note that while this function is only relevant to models with absorbing states, models in msm can have any transition structure and do not necessarily have to have an absorbing state.
Author(s)
C. H. Jackson chris.jackson@mrc-bsu.cam.ac.uk