compete
compete
compete
1 Multi-state models
A multi-state model is used to model a process where subjects transition from one state to
the next. For instance, a standard survival curve can be thought of as a simple multi-state
model with two states (alive and dead) and one transition between those two states. A diagram
illustrating this process is shown in the top left corner of gure 1. In these types of diagrams,
each box is a state and each arrow is a possible transition. The lower left diagram depicts a
classic competing risk analysis, where all subjects start on the left and each subject can make
a single transition to one of 3 terminal states. The bottom right diagram shows a common
multi-state situation known as the illness-death model with recovery. Finally, the upper right
diagram represents sequential events, such as repeated infections in the CGD study. In that case
one subject had 8 events so there are 9 states corresponding to entry into the study (0 infections)
and the rst, second, . . . , eighth events.
As will be shown below, there are often multiple choices for the state and transition diagram,
and for some data sets it is revealing to look at a problem from multiple views. In addition to
deciding the diagram that best matches the research questions, the two other primary decisions
are the choice of time scale for the ts, e.g., time from entry in the study vs. time from entry in
the state, and what covariates will be used.
2 Multi-state curves
2.1 Aalen-Johansen estimate
As a starting point for the analysis, it is important to compute and plot estimates of p(t), which
is a vector containing the probability of being in each of the states at time t. If there is no
censoring then p becomes a simple tabulation at time t of all the states. For the general case,
we compute this using the Aalen-Johansen estimate via the survfit function.
Mathematically the estimate is simple. For each unique time where an event occurs, form the
transition matrix T (t) with elements or rates of λij (t) = the fraction of subjects who transition
from state i to j at time t, among those in state i just prior to time t. (T is equal to the identity
matrix at any time point without an observed transition.) Then
Y
p(t) = p(0) T (s) (1)
s≤t
1
Alive Dead 0 1 2 ...
D1
Illness
A D2 Health
Death
D3
Figure 1: Four multi-state models. The upper left panel depicts simple survival, the upper right
depicts sequential events, the lower left is an example of competing risks, and the lower right
panel is a multi-state illness-death model.
2
where p(0) is the initial distribution of subjects.
Let's work this out for the simple two-state alive → death model. Let n(t) be the number
of subjects still at risk at time t and d(t) the number of deaths at that time point. All subjects
start in the alive state and thus p(0) = (1, 0) and the transition matrix is
n(s)−d(s) d(s)
n(s) n(s)
T (s) =
0 1
The two rows are start in state 1 (alive) and start in state 2 and the two colums are nish
in state 1, nish in state 2 (death). The second row corresponds to the fact that death is an
absorbing state: the probability of a death → alive transition (lower left element) is 0.
Writing out the matrices for the rst few transitions and multiplying them leads to
Y
p1 (t) = [n(s) − d(s)] /n(s) (2)
s≤t
which we recognize as the Kaplan-Meier estimate of survival. For the two state alive-dead model
the Aalen-Johansen (AJ) estimate has reprised the KM. In the competing risks case p(t) has an
alternate form known as the cumulative incidence (CI) function
Z t
CIk (t) = λk (u)S(u)du (3)
0
where λk is the incidence function for outcome k, and S is the overall survival curve for time to
any endpoint. Repeating the same matrix exercise for the competing risks, i.e. writing out the
Aalen-Johansen computation, exactly recovers the CI formula. The CI is also a special case of
the Aalen-Johansen. (The label cumulative incidence is one of the more unfortunate ones in
the survival lexicon, since we normally use `incidence' and `hazard' as interchangeable synonyms
but the CI is not a cumulative hazard.) The AJ estimate is very exible; subjects can visit
multiple states during the course of a study, subjects can start after time 0 (delayed entry), and
they can start in any of the states. The survfit function implements the AJ estimate and will
handle all these cases.
The standard error of the estimates is computed using an innitesimal jackknife. Let D(t)
be a matrix with one row per subject and one column per state. Each row contains the change
in p(t) i, i.e., the derivative of p with respect to the ith subject's
corresponding to subject
case weight dp(t)/dwi . Then V (t) = D′ W D is the estimated variance-covariance matrix of the
estimates at time t, where W is a diagonal matrix of observation weights. If a single subject
is represented by multiple rows in the data set, then D is rst collapsed to have one row per
subject, the new row for subject i is the sum of the rows for the observations that represented
the subject. This is essentially the same algorithm as the robust variance for a Cox model.
For simple two state alive -> dead model without case weights, the IJ estimate of variance is
identical to the traditional Greenwood estimate for the variance of the survival curve S. (This
was a surprise when we rst observed it; proving the equivalence is not straightforward.)
The p(t) vector obeys the obvious constraint that its sum at any time is equal to one; i.e.,
each person has to be somewhere. We will use the phrase probability in state or simply p when
referring to the vector.
3
PCM PCM
Entry Entry
Death Death
Entry
Multi−state 2
In the simple two state model Pr(alive) is the usual KM survival estimate, and we have
p1 (t) = 1 − p2 (t), Pr(alive) = 1 - Pr(dead). Plots for the 2 state case sometimes choose to show
Pr(alive) and sometimes Pr(dead). Which one is used often depends on a historical whim of the
disease specialty; cardiology journals for instance quite often use Pr(event) resulting in curves
that rise starting from zero, while oncology journals invariably use Pr(alive) giving curves that
fall downhill from 1. The survfit routine's historical default for the 2 state case is to print
and plot Pr(alive)= p1 (t), which reects that the author of the routine was working primarily
in cancer trials at the time said default was chosen.
For simple survival we have gotten used to the idea of using Pr(dead) and Pr(alive) inter-
changeably, but that habit needs to be left behind for multi-state models, as curves of 1 − pk (t)
= probability(any other state than k) are not useful. In the multi-state case, some curves will
rise and then fall. For competing risks the curve for the initial state (leftmost in the diagram) is
rarely included in the nal plot. Since the curves sum to 1, the full set is redundant. Pr(nothing
yet) is usually the least interesting of the set and so it is left o to make the plot less busy. The
remaining curves in the competing risks case rise from 0. (This bothers some researchers as it
`just looks wrong' to them.)
4
2.2 Examples
Start with a simple competing risks problem as illustrated in the rst diagram of gure 2. The
mgus2 data set contains the time to plasma cell malignancy (PCM) and/or death for 1384 subjects
diagnosed with monoclonal gammopathy of undetermined signicance (MGUS). Survival and
progression time are in months. The code below creates an ordinary Kaplan-Meier curve of
post-diagnosis survival for these subjects, along with a histogram of age at diagnosis. The mean
age at diagnosis is just over 70 years.
5
1.0
female
male
100
0.8
80
0.6
Frequency
Survival
60
0.4
40
0.2
20
0.0
0
30 40 50 60 70 80 90 0 5 10 15 20 25 30 35
6
Call: survfit(formula = Surv(etime, event) ~ sex, data = mgus2)
death:female
death:male
pcm:female
0.4
pcm:male
0.2
0.0
0 5 10 15 20 25 30 35
7
The mfit2 call is nearly identical to that for an ordinary Kaplan-Meier, with the exception
of the event variable.
1. The event variable was created as a factor, whereas for ordinary single state survival the
status is either 0/1 or TRUE/FALSE. The rst level of the factor must be censoring,
which is the status code for those whose follow-up terminated without reaching a new
endpoint. Codes for the remaining states can be in any order. The labels for the states
are unrestricted, e.g., the rst one does not have to be censor. (It will be treated as `no
event at this time', whatever the label.)
2. A simple print of the mfit2 object shows the order in which the curves will be displayed.
This information was used to choose the line types and colors for the curves.
3. The mfit2 object contains curves for all the states, but by default the entry state will not
be plotted. The remaining curves all start at 0.
4. The transitions component of the result is useful as a data check, e.g., if it showed a
transition from death to PCM.
5. Each subject's initial state can be specied by the istate argument. When this is omitted
all subjects are assumed to start from an entry state named '(s0)'. This default name is
an amalgam of state 0, a label sometimes used in textbooks for the leftmost box, and an
R convention of using () for constructed names, e.g., `(Intercept)' from an lm() call.
The printout shows that a male subject will spend, on average, 8.7 of his rst 20 years post
diagnosis in the entry state, 1.1 years in the PCM state and 10.3 of those 20 in the death state.
If a cuto time is not given the default is to use the maximum observed time for all curves,
which is 424 months in this case.
The result of a multi-state survfit is a matrix of probabilities with one row per time and
one column per state. These are contained in the probability-in-state (pstate) component of
the resulting survt object. Since the three MGUS states of entry/pcm/death must sum to 1 at
any given time (everyone has to be somewhere), one of the three curves is redundant and the
fraction still in the entry state curve is normally the least interesting. By default, any state
with the label `(s0)' is left o of the plot; which is the default value of the noplot option of
plot.survfit. One can easily plot all of the states by setting the option to NULL.
A common mistake with competing risks is to use the Kaplan-Meier separately on each event
type while treating other event types as censored. The next plot is an example of this for the
PCM endpoint.
8
0.25
0.15
0.10
0.05
0.00
0 5 10 15 20 25 30 35
9
both depend on this. Our model looks like the illness-death model of gure 1 but with PCM
as the upper state and no arrow for a return from that state to health. The necessary data set
will have two rows for any subject who has further follow-up after a PCM and a single row for
all others. The data set is created below using the tmerge function, which is discussed in detail
in another vignette.
We need to decide what to do with the 9 subjects who have PCM and death declared at the
same month. (Some of these were cancer cases discovered at autopsy.) They slipped through
without comment in the earlier competing risks analysis; only when setting up this second data
set did we notice the ties. Looking back at the code, the prior example counted these subjects
as a progression. In retrospect this is a defensible choice: even though undetected before death,
the disease must have been present for some amount of time previous and so progression did
occur rst. For the multi-state model we need to be explicit in how this is coded since a sojourn
time of 0 within a state is not allowed. Below we push the progression time back by .1 month
when there is a tie, but that amount is entirely arbitrary. Since there are 3 possible transitions
we will call the data set data3.
The table above shows that there are no observations in data3 that have both a PCM and death,
i.e., the ties have been resolved. The last tmerge line above creates a variable enum which simply
counts rows for each person, which is often useful.
10
to
from pcm death (censored)
(s0) 115 860 409
pcm 0 103 12
death 0 0 0
> plot(mfit3[,"pcm"], mark.time=FALSE, col=1:2, lty=1:2, lwd=2,
xscale=12,
xlab="Years post MGUS diagnosis", ylab="Fraction in the PCM state")
> legend(40, .4, c("female", "male"), lty=1:2, col=1:2, lwd=2, bty='n')
0.04
0.03
Fraction in the PCM state
0.02
0.01
0.00
0 5 10 15 20 25 30 35
11
We have often found the three curve display shown below useful in the case of a transient
state. It combines the results from competing risk model used above along with a second t
that treats death after PCM as a separate state from death before progression, the multi-state
2 model of gure 2. In this plot the fraction of subjects currently in the PCM state is shown by
the distance between the two curves. Only males are shown in the plot to minimize overlap.
0 5 10 15 20 25 30 35
12
2.3 Further notes
The Aalen-Johansen method used by survfit does not account for interval censoring, also
known as panel data, where a subject's current state is recorded at some xed time such as
a medical center visit but the actual times of transitions are unknown. Such data requires
further assumptions about the transition process in order to model the outcomes and has a more
complex likelihood. The msm package, for instance, deals with data of this type. If subjects
reliably come in at regular intervals then the dierence between the two results can be small,
e.g., the msm routine estimates time until progression occurred whereas survfit estimates time
until progression was observed.
When using multi-state data to create Aalen-Johansen estimates, individuals are not al-
lowed to have gaps in the middle of their time line. An example of this would be a data
set with (0, 30, pcm] and (50,70, death] as the two observations for a subject where the
time from 30-70 is not accounted for.
Subjects must stay in the same group over their entire observation time, i.e., variables on
the right hand side of the equation cannot be time-dependent.
A transition to the same state is allowed, e.g., observations of (0,50, 1], (50, 75, 3], (75,
89, 4], (89, 93, 4] and (93, 100, 4] for a subject who goes from entry to state 1, then to
state 3, and nally to state 4. However, a warning message is issued for the data set in
this case, since stuttering may instead be the result of a coding mistake. The same result
is obtained if the last three observations were collapsed to a single row of (75, 100, 4].
3 Rate models
For simple two-state survival, the Cox model leads to three relationships
where λ, Λ and S are the hazard, cumulative hazard and survival functions, respectively. There
is a single linear predictor which governs both the rate λ (the arrow in gure 1) and probability
of residing in the left hand box of the gure. For multi-state models this simplicity no longer
holds; proportional hazards does not lead to proportional p(t) curves. There is a fundamental
dichotomy in the analysis namely that
The analysis of multi-state data has four key steps. In order of importance:
13
(a) Which covariates should be attached to each rate? Sometimes a covariate is important
for one transition, but not for another.
(b) For which transitions should one or more of the covariates be constrained to have
the same coecient? Sometimes there will be a biologic rationale for this. For other
studies an equivalence is forced simply because we have too many unknowns and
cannot accommodate them all. (This is the same reason that models often contain
very few interaction terms).
(c) Which, if any, of the transitions should share the same baseline hazard? Most of the
time the baseline rates are all assumed to be dierent.
(d) Should there be random eects, and if so what is an appropriate correlation structure?
Do some pairs of transitions have a shared eect, some pairs separate eects and others
no random eect? Mixed eects Cox models tend to need larger sample size does
the data set have enough events?
4. Fit the data. Examine multiple summaries of the model t, including the predicted occu-
pancy curves.
Step 1 is key to the entire endeavor. We saw in gure 2 and the examples above that multiple
views of a multi-state process can be useful, and this will hold for modeling as well. Step 3 will
often be the one that demands the most attention to detail.
Start with the simplest model for the MGUS data: a competing risks model (upper left diagram of
gure 2), distinct baseline hazards for the two rates, no shared coecients, and three covariates.
14
1:3 coef exp(coef) se(coef) robust se z p
age 0.0652 1.0674 0.0036 0.0037 17.4 <2e-16
sexM 0.3889 1.4754 0.0699 0.0666 5.8 5e-09
mspike -0.0593 0.9425 0.0639 0.0620 -1.0 0.3
15
> dummy <- expand.grid(sex=c("F", "M"), age=c(60, 80), mspike=1.2)
> dummy
sex age mspike
1 F 60 1.2
2 M 60 1.2
3 F 80 1.2
4 M 80 1.2
> csurv <- survfit(cfit1, newdata=dummy)
> dim(csurv)
data states
4 3
The resulting set of Aalen-Johansen estimates can be indexed as though it were an array. There
is only one stratum (the Cox model did not have strata), four hypothetical subjects, and 3
states. (When there is only a single stratum, as here, the subscript method allows that index to
be omitted, for backwards compatability).
16
0.14
0.06
0.04
0.02
0.00
0 5 10 15 20 25
The above table shows that females are predicted to have a higher risk of 20 year progression,
even though their hazard at any given moment is nearly identical to males. The female/male
dierence at 20 years is on the order of our back of the napkin person-years estimate of 1%
17
progression per year * 1.7 more years of life for the females, but the progression fraction varies
substantially by group.
4 Fine-Gray model
For the competing risk case the Fine-Gray model provides an alternate way of looking at the data.
As we saw above, the impact of a particular covariate on the nal values P can be complex, even
if the models for the hazards are relatively simple. The primary idea of the Fine-Gray approach
is to turn the multi-state problem into a collection of two-state ones. In the upper right diagram
of gure 2, draw a circle around all of the states except the chosen endpoint and collapse them
into a single meta-state. For the MGUS data these are
Model 1
Model 2
An interesting aspect of this is that the t can be done as a two stage process: the rst stage
creates a special data set while the second ts a weighted coxph or survfit model to the data.
The data set can be created using the finegray command.
18
The finegray command has been used to create two data sets: one for the PCM endpoint
and one for the death endpoint. In each, four new variables have been added containing a
survival time (fgstart, fgstop, fgstatus) with an `ordinary' status of 0/1, along with a
case weight and a large number of new rows. We can use this new data set as yet another
way to compute multi-state survival curves, though there is no good reason to use this rather
roundabout approach instead of the simpler survfit(Surv(etime, event) ~sex).
> # The PCM curves of the multi-state model
> pfit2 <- survfit(Surv(fgstart, fgstop, fgstatus) ~ sex,
data=pcmdat, weight=fgwt)
> # The death curves of the multi-state model
> dfit2 <- survfit(Surv(fgstart, fgstop, fgstatus) ~ sex,
data=deathdat, weight=fgwt)
Inspection shows that the two new curves are almost identical to the prior estimates based on
the Aalen-Johansen estimate (mfit2), and in fact would be identical if we had accounted for the
slightly dierent censoring patterns in males and females (by adding strata(sex) to the right
hand side of the finegray formulas).
A Cox model t to the constructed data set yields the Fine-Gray models for PCM and for
death.
19
Call:
coxph(formula = Surv(fgstart, fgstop, fgstatus) ~ sex, data = deathdat,
weights = fgwt)
20
0.30
Female, Aalen−Johansen
Male, Aalen−Johansen
0.25
Female, Fine−Gray
Male, Fine−Gray
0.20
Fraction with PCM
0.15
0.10
0.05
0.00
0 5 10 15 20 25 30 35
and assume that γk (t; x) = γk0 (t) exp(Xβ). In a 2 state alive −→ death model, γ becomes
the usual hazard function λ. In the same way that our multivariate Cox model cfit1 made
the simplifying assumption that the impact of male sex is to increase the hazard for death
by a factor of 1.48, independent of the subject's age or serum mspike value, the Fine-Gray
model assumes that each covariate's eect on log(1 − F ) is a constant, independent of other
variables. Both model's assumptions are wonderfully simplifying with respect to understanding
21
a covariate, since we can think about each covariate separately from all the others. This is,
of course, under the assumption that the model is correct: that additivity across covariates,
linearity, and proportional hazards all hold. In a multi-state model, however, these assumptions
cannot hold for both the per-transition and Fine-Gray models formulations at the same time; if
true for one, they will not be true for the other.
Now consider a multivariate t on age, sex, and serum m-spike.
The Fine-Gray ts show an eect of all three variables on the subdistribution rates. Males have
a lower lifetime risk of PCM before death and a higher risk of death before PCM, while a high
serum m-spike works in the opposite direction. The Cox models showed no eect of sex on the
instantaneous hazard of PCM and none for serum m-spike on the death rate. However, as shown
in the last section, the Cox models do predict a greater lifetime risk for females. We had also
seen that older subjects are less likely to experience PCM due to the competing risk of death;
this is reected in the FG model as a negative coecient for age.
Now compute predicted survival curves for the model, and show them alongside the predic-
tions from the multi-state Cox model.
22
0.15
0.15
Female, 60 Female, 60
Male, 60 Male, 60
Female: 80 Female: 80
Male, 80 Male, 80
Multi−state predicted
0.10
0.10
Fine−Gray predicted
0.05
0.05
0.00
0.00
0 5 10 15 20 25 0 5 10 15 20 25
Years Years
The predictions as a function of age group are quite dierent for the Fine-Gray model: new
PCM cases are predicted 20+ years after diagnosis in both the old and young age groups, while
they are predicted to cease in the multi-state t. The average of all four curves is nearly the
same at each age, but the global proportional hazards assumption of the FG model forces the
curves to remain parallel.
We can check the proportional hazards assumption of the models using the cox.zph function,
linearity of the continuous variables age and mspike by using non-linear terms such as pspline
or ns, and additivity by exploring interactions. All are obvious and important next steps. For
instance, the proportional hazards assumption for age shows clear violations.
23
0.10
0.05
0.00
Beta(t) for age
Time
A further weakness of the Fine-Gray approach is that since the two endpoints are modeled
separately, the results do not have to be consistent. Below is a graph of the predicted fraction
who have experienced neither endpoint. For subjects diagnosed at age 80 the Fine-Gray models
predict that more than 100% will either progress or die by 30 years. Predictions based on the
Aalen-Johansen approach do not have this issue.
24
1.0
0.8
FG: either endpoint
0.6
0.4
0.2
Female, 60
Male, 60
Female: 80
0.0
Male, 80
0 5 10 15 20 25 30
1. The attempt to capture a complex process as a single value is grasping for a simplicity
that does not exist for many (perhaps most) data sets. The necessary assumptions in a
multivariate Cox model of proportional hazards, linearity of continuous variables, and no
interactions are strong ones. For the FG model these need to hold for a combined process
the mixture of transition rates to each endpoint which turns out to be a more dicult
barrier.
3. From the per-transition Cox model one can work forward and compute p(t), the occupancy
probabilities for each state over time; both the hazard ratios and p are useful summaries of
the data. We don't have tools to work backwards from a Fine-Gray t to the per transition
hazards.
4. The approach is viable only for competing risks and not for other multi-state models.
25
The last of these is perhaps the most frequently listed issue with the Fine-Gray model, but it
is actually a minor complaint. The state probabilities p(t) in a multi-state model are implicitly
fractions of the total population we started with: someone who dies in month 1 is still a part of
the denominator for the fraction of subjects with PCM at 20 years. In the Fine-Gray formulas
this subject explicitly appears in risk set denominators at a later time, which looks odd but is
more of an artifact.
The rst issue is substantial, however, and checking the model assumptions of a Fine-Gray
t is mandatory. The second point is alarming, but it normally does not have a practical impact
unless there is long follow-up.
5 Shared coecients
To t risk models that have shared coecients or baseline hazards we use an extended formula
notation for the coxph function. For the simple competing risks MGUS t above, assume that
we wanted to add hemoglobin to the t, with a common coecient for both the PCM and death
endpoint. (Anemia is a feature of both PCM and old age.)
1:2 p
age 0.0952
sexM 0.4345
mspike 4.81e-08
hgb 5.50e-15
26
1:3 p
age < 2e-16
sexM 1.5e-13
mspike 0.19
hgb 5.5e-15
Notice that the hemoglobin coecient is identical for the PCM and death models. A closer look
at the result shows that the coecient vector is of length 7 and not 8, orchestrated by the cmap
component. The variance matrix likewise is 7 by 7.
> hgfit$coef
age_1:2 sexM_1:2 mspike_1:2 hgb age_1:3
0.01105974 0.14776052 0.90674053 -0.14352039 0.05836029
sexM_1:3 mspike_1:3
0.51042581 -0.08182865
> hgfit$cmap
1:2 1:3
age 1 5
sexM 2 6
mspike 3 7
hgb 4 4
In a coxph formula list, the rst element is the default formula which will be applied to all the
transitions. The second, third, etc. elements are pseudo-formulas that have a set of transitions
as the response, and usual covariate formulas on the right. For instance, if we wanted creatinine
to be a covariate for only the transition to PCM a third line of 1:2 ~creat could be added.
There is exibility in how the left hand side is written. The following are all valid forms for
the second line of our formula.
> cox3a <- coxph(Surv(tstart, tstop, event) ~ age + sex, data3, id=id)
> cox3b <- coxph(list(Surv(tstart, tstop, event) ~ age + sex,
27
1:3 + 2:3 ~ 1/ common),
data= data3, id= id)
> cox3b$cmap
1:2 1:3 2:3
age 1 3 5
sexM 2 4 6
For this data set model cox3b makes very little medical sense, since death rates after PCM do
not even remotely resemble those for patients without a plasma cell malignancy. (The fact that
the package allows something does not make it a good idea.) In other data sets a shared baseline
for all the transitions to death can be an eective model. Be aware that though shared baselines
for two transitions that end in the same state is acceptable, a shared hazard for two transitions
that originate in the same state is not compatable with the partial likelihood formulation of a
Cox model, and will lead to surprising results (often a large number of NA coecients).
An alternative approach to the above is to t the joint model using a special data set. To
reproduce the hgfit model above, create a stacked data set with 2n observations. The rst n
rows are the data set we would use for a time to PCM analysis, with a simple 0/1 status variable
encoding the PCM outcome. The second n rows are the data set we would have used for the
`death before PCM' ts, with status encoding the death-before-PCM endpoint. A last variable,
group, is `pcm' for the rst n observations and `death' for the remainder. Then t a model
This ts a common eect for hemoglobin (hgb) but separate age and sex eects for the two
endpoints, along with separate baseline hazards.
6 Other software
6.1 The mstate package
As the number of states + transitions (arrows + boxes) gets larger then the `by hand' approach
used above for creating a stacked data set becomes a challenge. (It is still fairly easy to do, just
not as easy to ensure it has been done correctly.) The mstate package starts with a denition of
the matrix of possible transitions and uses that to drive tools that build and analyze a stacked
data set in a more automated fashion. We nd it a little more dicult to use than a coxph
model with a multistate status variable. (The fact that we like our own child best should be no
surprise, however). One current disadvantage of the survival package is that the Aalen-Johansen
curves from a multi-state coxph model currently do not include a variance estimate, whereas
those from mstate do have a variance.
28
A current restriction in R is that packages on the recommended list (of which survival is one)
should not depend on any packages outside that list. This precludes adding an mstate example
to this vignette, even though it is a natural t.
Panel data arises when subjects have regular visits, with the current state assessed at each
visit. We don't know when the transitions between states occur, or if other states may
have been visited in the interim only the subject's state at specic times. This is also
known as interval censored data.
Survival data arises when we observe the transition times; death, for example.
The overall model (boxes and arrows), the quantities of interest (transition rates and p(t)),
and the desired printout and graphs are identical for the two cases. Much of the work in creating
a data set is also nearly the same. The underlying likelihood equations and resulting analytical
methods for solving the problem are, however, completely dierent. The msm package addresses
panel data, while survival, mstate, and many others are devoted to survival data.
7 Conclusions
When working with acute diseases, such as advanced cancer or end-stage liver disease, there is
often a single dominating endpoint. Ordinary single event Kaplan-Meier curves and Cox models
are then ecient and sucient tools for much of the analysis. Such data was the primary use
case for survival analysis earlier in the authors' careers. Data with multiple important endpoints
is now common, and multi-state methods are an important addition to the statistical toolbox.
As shown above, they are now readily available and easy to use.
It is sometimes assumed that the presence of competing risks requires the use of a Fine-Gray
model (we have seen it in referee reports), but this is not correct. The model may often be
useful, but is one available option among many. Grasping the big picture for a multi-state data
set is always a challenge and we should make use of as many tools as possible. It is not always
easy to jump between observed deaths, hazard rates, and lifetime risk. We are often reminded
of the story of the gentleman on his 100th birthday who proclaimed that he was looking forward
to many more years ahead because I read the obituaries every day, and you almost never see
someone over 100 listed there.
29