survival analysis i (chl5209h) · analysis of failure time data, second edition. introductory,...
TRANSCRIPT
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-1
Survival AnalysisI (CHL5209H)
Olli Saarela
Dalla Lana School of Public HealthUniversity of Toronto
January 7, 2015
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-2
Literature
I Clayton D & Hills M (1993): Statistical Models inEpidemiology. Not really useful as a reference text butinteresting pedagogical approach.
I Kalbfleisch JD & Prentice RL (2002): The StatisticalAnalysis of Failure Time Data, Second Edition.Introductory, serves as a reference text.
I Klein JP & Moeschberger ML (2003): Survival Analysis -Techniques for Censored and Truncated Data, SecondEdition. Introductory, serves as a reference text.
I Aalen OO, Borgan Ø, Gjessing H (2008): Survival andEvent History Analysis - A Process Point of View. Forthose looking for something more theoretical.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-3
Motivation: Poisson regression
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-4
Survival analysis?
I Survival analysis focuses on a single event per individual(say, first marriage, graduation, diagnosis of a disease,death). Analysis of multiple events would be referred to asevent history analysis.
I Despite the name, a course in survival analysis is mostlynot about survival.
I Rather, most of the time, we concentrate on estimating ormodeling a more fundamental quantity, the rate parameterλ, or the time-dependent version, the hazard functionλ(t).
I Survival probability in turn is determined by the hazardfunction.
I The rates can be for example mortality or incidence rates.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-5
More about rates
I Rate parameter is the parameter of the Poissondistribution, characterizing the rate of occurrence of theevents of interest.
I The expected number of events µ in a total of Y years offollow-up time and λ are connected by
µ = λY .
I The observed number of events D in Y years of follow-uptime is distributed as D ∼ Poisson(λY ).
I How to estimate the rate parameter λ?
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-6
An estimator for λ
I A possible estimator is suggested by
µ = λY ⇔ λ =µ
Y.
I It would seem reasonable to replace here the expectednumber of events µ with the observed number of events Dand take
λ̂ =D
Y.
I This is in fact the maximum likelihood estimator of λ.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-7
Maximum likelihood criterion
I Maximum likelihood estimate is the parameter value thatmaximizes the probability of observing the data D.
I The probability of the observed data is given by thestatistical model, which is now
D ∼ Poisson(λY ).
I Probabilities under the Poisson distribution are given by
(λY )D
D!e−λY .
I We consider this probability as a function of λ, and call itthe likelihood of λ.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-8
Maximizing the likelihood
I We may ignore any multiplicative terms not depending onthe parameter, and instead maximize the expression
λDe−λY .
I Or, for mathematical convenience, its logarithm
D log λ− λY .
I How to find the argument value which maximizes afunction?
I Set the first derivative to zero and solve w.r.t. λ:
D
λ− Y = 0 ⇔ λ =
D
Y.
I Check that the second derivative is negative:
− D
λ2< 0.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-9
Follow-up data
I Clayton & Hills (1993, p. 41):
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-10
Estimate
I For the 7 subjects (individuals) there is a total of 36 timeunits of follow-up time/person-time, and 2 outcomeevents (for individuals 2 and 6).
I The follow-up of the other individuals was terminated bycensoring (e.g. by events other than the outcome event ofinterest).
I In fact, censoring is the reason why we need to approachthe estimation problem through rates, rather than lookingat the event times directly.
I We arrive at
λ̂ =D
Y=
2
36≈ 0.056.
I To recap:I Estimand/parameter/object of inference: λI Estimator: D
YI Estimate: 0.056.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-11
Interpretation?
I We will define the rate parameter more precisely shortly,but let us first consider the interpretation.
I Unlike the risk parameter, the probability of an eventoccurring within a specific time period, the rate parameterdoes not correspond to a follow-up period of a fixedlength.
I Rather, it characterizes the instantaneous occurrence ofthe outcome event at any given time.
I The rate parameter is not a probability, but it can becharacterized in terms of the risk parameter when thefollow-up period is very short.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-12
Time unit
I Suppose that each of the N = 36 time bins here is oflength h = 0.05 years:
I In total there is Y = Nh = 36× 0.05 = 1.8 years offollow-up.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-13
From risk to rate
I The empirical rate is given by λ̂ = 21.8 = 1.11 per
person-year, or, say, 1110 per 1000 person-years.
I Per person-year, the empirical rate would be the same,had we instead split the person-time into 180 bins oflength 0.01 years.
I Suppose that we have made the time bins short enough sothat at most one event can occur in each bin.
I Whether an event occurred in a particular bin of length his now a Bernoulli-distributed variable, with the expectednumber of events equal to the risk π.
I Thus, because rate is the expected count divided byperson-time, when h is small, we have
λ =π
h⇔ π = λh.
I This connection is important in understanding how rate isrelated to survival probability.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-14
Survival probabilityI One of the particular properties of the natural logarithm
and its inverse is that when x is close to zero, ex ≈ 1 + x ,and conversely, log(1 + x) ≈ x .
I Suppose that we are interested in the probability ofsurviving T years. By splitting the timescale so thatN = T
h , T = Nh.I The probability of surviving through a single time bin of
length h, conditional on surviving until the start of thisinterval, is 1− π = 1− λh.
I By the multiplicative rule, the T year survival probabilityis thus
(1− λh)N .
I This motivates the well-known Kaplan-Meier estimator, tobe encountered later.
I In turn, the logarithm of this is
N log(1− λh) ≈ −Nλh = −λT .
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-15
Survival and cumulative hazard
I The quantity λT is known as the cumulative hazard.
I We have (approximately, without calculus) obtained afundamental relationship of survival analysis, namely thatthe T year survival probability is
(1− λh)N ≈ e−λT .
I Let us test whether this approximation actually works.Now λ̂ = 1.11.
I If T = 1 and h = 0.05, N = 20 and we get(1− 1.11× 0.05)20 ≈ 0.319.
I The exact one year survival probability ise−1.11×1 ≈ 0.330.
I We should get a better approximation through a finer splitof the time scale.
I If h = 0.01, N = 100 and (1− 1.11× 0.01)100 ≈ 0.328.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-16
Regression modelsI Recall the relationship µ = λY . If γ = log λ, uquivalently
we have a log-linear form
logµ = γ + log Y ,
where we call log Y an offset term.I γ is an unknown parameter, which we could estimate in an
obvious way. (How?)I Such a one-parameter model is not very interesting, but
serves as a starting point to regression modeling.I Consider now the expected number of events µ1 in Y1
years of exposed person-time and the expected number ofevents µ0 in Y0 years of unexposed person-time.
I The corresponding probability models are now
D1 ∼ Poisson(µ1) and D0 ∼ Poisson(µ0),
where µ1 = λ1Y1 and µ0 = λ0Y0.I Here µ1 + µ0 = µ and D1 + D0 = D.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-17
Combining the two modelsI We may now parametrize the two log-rates in terms of an
intercept term α and a regression coefficient β aslog λ0 = α and log λ1 = α + β.
I By introducing an exposure variable Z , with Z = 1(Z = 0) indicating the exposed (unexposed) person-time,we can express these definitions as a regression equation
log λZ = α + βZ ⇔ λZ = eα+βZ .
I This results in a single statistical model, namely
DZ ∼ Poisson(
YZeα+βZ).
I What is the interpretation of the regression coefficient?I Now we have
λ1
λ0=
eα+β
eα=
eαeβ
eα= eβ,
or β = log(λ1λ0
), that is, the log rate ratio.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-18
Reparametrizing ratesI The model can be easily extended to accommodate more
than one determinant.I For example, unadjusted comparisons of rates are
susceptible to confounding; we can move on to considerconfounder-adjusted rate ratios.
I Consider the following dataset:
I Introduce an exposure variable taking values Z = 1(energy intake < 2750 kcals) and Z = 0 (≥ 2750 kcals),and an age group indicator taking values X = 0 (40− 49),X = 1 (50− 59) and X = 2 (60− 69).
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-19
The original parameters
I There are now six rate parameters λZX , corresponding toeach exposure-age combination:
Z = 0 Z = 1X = 0 λ00 λ10
X = 1 λ01 λ11
X = 2 λ02 λ12
I The corresponding statistical distributions are
Z = 0 Z = 1X = 0 D00 ∼ Poisson(Y00λ00) D10 ∼ Poisson(Y10λ10)X = 1 D01 ∼ Poisson(Y01λ01) D11 ∼ Poisson(Y11λ11)X = 2 D02 ∼ Poisson(Y02λ02) D12 ∼ Poisson(Y12λ12)
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-20
Transformed parameters
I Now, we are not primarily interested in estimating sixrates; rather, we are interested in the rate ratio betweenthe exposure categories, adjusting for age.
I We could parametrize the rates w.r.t. the baseline, orreference, rate λ00 which is then modified by the exposureand age (cf. Clayton & Hills 1993, p. 220).
I DefineZ = 0 Z = 1
X = 0 λ00 = λ00 λ10 = λ00θX = 1 λ01 = λ00φ1 λ11 = λ00θφ1
X = 2 λ02 = λ00φ2 λ12 = λ00θφ2
I Now θ is the rate ratio within each age group (verify).
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-21
Regression parameters
I As before, we can specify the reparametrization in termsof a link function and a linear predictor as
log λZX = α + βZ + γ11{X=1} + γ21{X=2}.
I SinceλZX = eα+βZ+γ11{X=1}+γ21{X=2} ,
we have that λ00 = eα, θ = eβ, φ1 = eγ1 and φ2 = eγ2 .
I The rates are now given by the regression equation as
Z = 0 Z = 1X = 0 λ00 = eα λ10 = eα+β
X = 1 λ01 = eα+γ1 λ11 = eα+β+γ1
X = 2 λ02 = eα+γ2 λ12 = eα+β+γ2
I The number of parameters has been reduced from six tofour.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-22
Specification in terms of expected counts
I A Poisson model is always specified in terms of theexpected event count: DZX ∼ Poisson(µZX ).
I The regression model for the expected count is specified by
µZX = YZXλZX = YZX eα+βZ+γ11{X=1}+γ21{X=2}
= eα+βZ+γ11{X=1}+γ21{X=2}+log YZX .
I We have obtained the model
DXZ ∼ Poisson(
eα+βZ+γ11{X=1}+γ21{X=2}+log YZX
).
I When fitting the model, log-person years has to beincluded in the linear predictor as an offset variable.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-23
Fitting the model
I The data as frequency records are entered into R as:
d <- c(4,5,8,2,12,14)
y <- c(607.9,1272.1,888.9,311.9,878.1,667.5)
z <- c(0,0,0,1,1,1)
x <- c(0,1,2,0,1,2)
I The model is specified as
model <- glm(d ~ z + as.factor(x) +
offset(log(y)),
family=poisson(link="log"))
I The as.factor(x) term specifies that we want toestimate separate age group effects (rather than assumethat the X -variable modifies the log-rate additively).
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-24
Results
Call:
glm(formula = d ~ z + as.factor(x) + offset(log(y)),
family = poisson(link = "log"))
Deviance Residuals:
1 2 3 4 5 6
0.73940 -0.58410 0.04255 -0.77385 0.42800 -0.03191
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -5.4177 0.4421 -12.256 < 2e-16 ***
z 0.8697 0.3080 2.823 0.00476 **
as.factor(x)1 0.1290 0.4754 0.271 0.78609
as.factor(x)2 0.6920 0.4614 1.500 0.13366
---
Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 14.5780 on 5 degrees of freedom
Residual deviance: 1.6727 on 2 degrees of freedom
AIC: 31.796
Number of Fisher Scoring iterations: 4
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-25
Proportional hazards
I From the model output, we may calculate estimates forthe original rate parameters (per 1000 person-years) as
Z = 0 Z = 1
X = 0 λ̂00 = 4.44 λ̂10 = 10.59
X = 1 λ̂01 = 5.05 λ̂11 = 12.05
X = 2 λ̂02 = 8.86 λ̂12 = 21.20
I Note that the rate ratio stays constant across the agegroups. This is forced by the earlier model specification.
I This is a modeling assumption, namely the proportionalhazards assumption.
I Compare these estimates to the corresponding sixempirical rates. Is assuming proportionality of the hazardrates justified? How could one test this? Or relax thisassumption?
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-26
Basic concepts
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-27
Counting process
I In survival analysis, the outcome is generally a pair ofrandom variables (Ti ,Ei ), where Ti represents the eventtime, and Ei the type of the event that occurred at Ti .
I Usually, we have to consider at least two types of events,namely the outcome event of interest (say, Ei = 1), andcensoring (say, Ei = 0), that is, termination of thefollow-up due to some other reason than the outcomeevent of interest.
I Equivalently, we can characterize the outcomes in terms ofthe cause-specific counting processes
Nij(t) = 1{Ti≤t,Ei=j}, j = 0, 1.
(What is a process?)
I We can also introduce an overall counting processNi (t) =
∑1j=0 Nij(t) for any type of event. If there is no
censoring, this is all we need.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-28
History
I The observed histories of such counting processes justbefore time t are denoted asFt− = σ({Nij(u) : i = 1, . . . , n; j = 0, 1; 0 ≤ u < t}).
I The mathematical characterization of this as a generatedσ-algebra is not important at this point, we only need tounderstand Ft− as all observed information before t.
I Consider now the conditional probability for an event (ofany type) occurring at t, that is,
P(dNi (t) = 1 | Ft−),
where dNi (t) ≡ Ni (t + dt)− Ni (t).
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-29
Hazard function
I Alternatively, this may be characterized as
P(dNi (t) = 1 | Ft−) = E [dNi (t) | Ft−]
= P(t ≤ Ti < t + dt | Ft−)
≡ λ(t) dt,
or
λ(t) =P(t ≤ Ti < t + dt | Ft−)
dt.
I When Ti ≥ t and the outcome of individual i does notdepend on the outcomes of other individuals, this isequivalent to the familiar definition
λ(t) = lim∆t→0
P(t ≤ Ti < t + ∆t | Ti ≥ t)
∆t.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-30
Connection to the survival function
I Now
P(t ≤ Ti < t + dt | Ti ≥ t) =P(t ≤ Ti < t + dt)
P(Ti ≥ t)
⇔ λ(t) =f (t)
S(t),
where f (t) is the density function and S(t) the survivalfunction of the event time distribution.
I Note that S(t) = 1− F (t) and f (t) = dF (t)dt .
I Further, d[log F (t)]dt = f (t)
F (t) and −d[log S(t)]dt = f (t)
S(t) .
I This gives us again the fundamental relationship
S(t) = exp
{−∫ t
0λ(u) du
},
where∫ t
0 λ(u) du ≡ Λ(t) is the cumulative hazard.
Survival AnalysisI (CHL5209H)
Olli Saarela
Motivation:Poissonregression
Basic concepts
31-31
Cause-specific hazards
I In the presence of censoring, we are not interested in theoverall hazard rate, but rather, the cause-specific hazardrate
P(dNij(t) = 1 | Ft−) = E [dNij(t) | Ft−]
= P(t ≤ Ti < t + dt,Ei = j | Ft−)
≡ λj(t) dt
for event type j .
I It is easy to see that these are related to the overall hazardby λ(t) =
∑1j=0 λj(t).
I The sub-density function corresponding to event type j isgiven by
fj(t) ≡ P(t ≤ Ti < t + dt,Ei = j)
dt= λj(t)S(t),
where S(t) is the overall survival function.