Compute and plot Kaplan-Meier estimates of the probability that each successive state has not occurred yet.
plotprog.msm(
formula,
subject,
data,
legend.pos = NULL,
xlab = "Time",
ylab = "1 - incidence probability",
lwd = 1,
xlim = NULL,
mark.time = TRUE,
...
)
A formula giving the vectors containing the observed states and the corresponding observation times. For example,
state ~ time
Observed states should be in the set 1, ...{}, n
, where n
is
the number of states.
Vector of subject identification numbers for the data
specified by formula
. If missing, then all observations are assumed
to be on the same subject. These must be sorted so that all observations on
the same subject are adjacent.
An optional data frame in which the variables represented by
state
, time
and subject
can be found.
Vector of the \(x\) and \(y\) position, respectively, of the legend.
x axis label.
y axis label.
Line width. See par
.
x axis limits, e.g. c(0,10) for an axis ranging from 0 to 10. Default is the range of observation times.
Mark the empirical survival curve at each censoring point,
see lines.survfit
.
Other arguments to be passed to the plot
and
lines.survfit
functions.
If the data represent observations of the process at arbitrary times, then
the first occurrence of the state in the data will usually be greater than
the actual first transition time to that state. Therefore the probabilities
plotted by plotprog.msm
will be overestimates.