17.6.2.2 Algorithms (Cox Proportional Hazard Regression)PHMCoxAlgorithm
Let ,for i = 1, 2, ?, n, be the failure time or censored time for the ith observation with the vector of p covariates . It is assumed that the failure and censored mechanisms are independent. The hazard function, , is the probability that an individual with covariates z fails at time t given that the individual survived up to time t. In the Cox proportional model is of the form:
where is the baseline hazard function, an unspecified function of time, is a vector of unknown parameters and is a known offset.
Assuming there are ties in the failure time giving distinct failure times, , such that individuals fail at , it follows that the marginal likelihood for is well approximated by:
where is the sum of covariate of individuals observed fail at and is the set of individuals at risk just prior to , that is it is all the individuals that fail or censored at time along with all individuals survived beyond the time . The MLE (maximum likelihood estimates) of , given by, are obtained by maximizing (1) using a NewtonRaphson iteration technique that includes step having and utilizes the first and second partial derivatives of (1) which are given by (2) and (3) below:
for j = 1, 2, ?, p, where is the jth element in the vector and
Similarly,
where h, j = 1, ? p.
is the jth component of a score vector is the (h, j) element of the observed information matrix whose inverse gives the variancecovariance matrix of .
It should be noted that if a covariate or a linear combination of covariates is monotonically increasing or decreasing with time ,then one or more of the will be infinite.
If varies across strata, where the number of individuals in the kth stratum is , k = 1, ?, , with , then rather than maximizing (1) to obtain , the following marginal likelihood is maximized:
where is the contribution to likelihood for the observations in the kth stratum treated as a single sample in (1). When strata are concluded the covariate coefficients are constant across strata but there is a different baseline hazard function .
The baseline survival function associated with a failure time , is estimated as
,
where
and is the number of failures at time . The residual of the lth observation is computed as:
where .
The deviance is defined as (logarithm of marginal likelihood). There are two ways to test whether individual covariates are significant: the differences between the deviances of nested models can be compared with appropriate distribution; or, the asymptotic normality of the parameter estimates can be used to form ztest by dividing the estimates by their standard errors or the score function for the model under the null hypothesis can be used to form ztest.
