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.
# S3 method for msm
plot(
x,
from = NULL,
to = NULL,
range = NULL,
covariates = "mean",
legend.pos = NULL,
xlab = "Time",
ylab = "Fitted survival probability",
lwd = 1,
...
)
Output from msm
, representing a fitted multi-state
model object.
States from which to consider survival. Defaults to the complete set of transient states.
Absorbing state to consider. Defaults to the highest-labelled absorbing state.
Vector of two elements, giving the range of times to plot for.
Covariate values for which to evaluate the expected
probabilities. 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)
Vector of the \(x\) and \(y\) position, respectively, of the legend.
x axis label.
y axis label.
Line width. See par
.
Other arguments to be passed to the generic plot
and lines
functions.
C. H. Jackson chris.jackson@mrc-bsu.cam.ac.uk
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.
msm