
332 FROM THE LOG-RANK TEST TO THE COX PROPORTIONAL HAZARDS MODEL
notation adapted to a more general situation. The starting point is the repeated means formula
E(Z) = E(E(Z|T )) which is valid for all stochastic variables. In our application T will be the
time-to-event variable, and we can introduce censoring into this by a censor process which is
independent of T . We then have that E(C(T )Z) = E(C(T )E(Z|T )), which we can write as
E(C(T )Z) =
∞
0
E(Z|T = t)d(t).
The left-hand side here is the expected value of Z among those individuals for whom we
observe an event, multiplied by the fraction of these among all. (t) is the sub-distribution
function describing observed events, and if we have a model from which we can deduce the
conditional means E(Z|T = t), the right-hand side is what the model predicts about Z in
individuals with an event. Replacing the left-hand side with what we observe, and d(t) with
the Nelson–Aalen estimator, this gives us a relation that can be used to fine-tune the model
that defines the conditional means. The log-rank test corresponds to the case where Z is one
for those in group 1, and zero for those in group 2. The left-hand side is then the number of
events, and the proportional hazards model tells us how to compute the conditional means.
The relation is therefore exactly what we use to estimate the hazard ratio parameter from data
(the fine-tuning referred to above). Note that this is the same interpretation as we had for the
estimating equation for the logistic equation, as was discussed in Section 9.4.
However, the derivation above is more general than the log-rank test, and we can make it
even more general by replacing Z with a predictable stochastic process. For our purposes we
settle for less, and replace Z with a(Y (T ))Z, where Y (t) is the fraction at risk at time t, a(u)a
function, and Z a stochastic variable (actually a vector). Suppose that we have a model which
depends on a parameter β, such that we can compute the function ¯z(t, β) = E(Z|T = t). This
gives us the stochastic variable U(T, β) = a(Y(T ))(Z − ¯z
(T, β)) about which we know that
E
β
(U(T, β)) = 0. If we have a sample of n from the population with observed event times t
i
,
we can estimate this mean with the average of the observations. This gives us the following
estimating equation for β:
U
n
(β) =
1
n
i
∞
0
a(Y(t))(z
i
− ¯z(t, β))dN
i
(t) = 0. (12.6)
Since a(Y(t)) is a predictable process the variance of U
n
(β) is estimated by
1
n
2
n
i=1
∞
0
a(Y(t))
2
(z
i
− ¯z(β, t))
2
dN
i
(t),
a fact we need when we want to derive a confidence function for β.
It remains to compute ¯z(t, β), for which we need a specific model. The log-rank test was
derived under the assumption of a proportional hazards model, so we assume it here as well.
This model will explain the frailty θ in terms of the covariate vector Z, so that there is a
vector of regression coefficients β such that θ = e
Zβ
. The choice of the exponential link here
is convenient, but not necessary. It simplifies some calculations and it is the assumption of the
Cox model, so we stick to it. Equation (11.4) means that this model estimates the conditional
mean ¯z(t, β)by
ˆ
S
1
(t, β)
ˆ
S
0
(t, β)
= ∂
β
ln
ˆ
S
0
(t, β),