I have the following data for 200 cases/subjects:

  • time to death over a 15 year period, $t$. A datum with a value of 180 months means that the subject did not die over the 15 year period.
  • the frequency of three particular types of event associated with each subject $a_{i}$, $b_{i}$ and $c_{i}$,

Apart from the obvious survival statistics and KM curves, how can I test the association between $t$ and each of $a_{i}$, $b_{i}$ and $c_{i}$. I am hypothesizing that a profile of $t$ will be distinct for each of $a_{i}$, $b_{i}$ and $c_{i}$.

One way I was thinking of testing this hypothesis was to simply do Pearson's correlation between $t$ and each of $a_{i}$, $b_{i}$ and $c_{i}$. I could then visualize this with a scatter plot of $t$ vs each of $a_{i}$, $b_{i}$ and $c_{i}$. Any suggestions on a more sophisticated analysis including variations of KM analysis? Code examples with R appreciated.

  • $\begingroup$ Do the events of type $a$,$b$,$c$ occur before the start of the follow-up period, or during it? In the latter case I think you would need their exact timing. $\endgroup$
    – Aniko
    Jun 3, 2012 at 16:07
  • $\begingroup$ @Aniko all events have been counted before the follow-up period. $\endgroup$ Jun 3, 2012 at 16:22

2 Answers 2


Here is a good way to start in R.

# Assume your survival data is in the vector time
surv_time <- Surv(time, time < 180)

With that you can do the popular Cox Proportional Hazard model

# a, b, and c are the vectors with frequency data.
summary(coxph(surv_time ~ a+b+c))

You will get a complete test of the effect of your 3 variables on the survival. The Cox PH model is

$$ \lambda(t|X) = \lambda(t)\exp(X\beta) $$

where $\lambda(t|X)$ is the hazard function, interpreting as the chance of dying at time $t$, and $X$ is a set of measures on the individual. What the model says is that this hazard function can be anything (not necessary exponentially decreasing), but that increase/decrease of the variables in $X$ will increase/decrase the hazard in a proportional way. Variables significant in the test above will tend to multiply or divide the hazard a lot.

For a very didactic introduction to this (and many other) topic, I recommend Frank Harrell's Regression Modeling Strategies.

  • $\begingroup$ Thanks but I suppose I'm looking for something that is alternative to or extends Cox PH $\endgroup$ Jun 3, 2012 at 16:30
  • $\begingroup$ Why so? Anything wrong with Cox PH, or you are looking for complementary alternatives? $\endgroup$
    – gui11aume
    Jun 3, 2012 at 16:38
  • $\begingroup$ Looking for complementary alternatives. $\endgroup$ Jun 3, 2012 at 19:26

Why not treat this as a competing risks model? The three types of event could be looked at as different outcomes. There is literature on this going back to the 1970s. A lot of recent work has been done by Jason Fine of UNC and Robert Gray. You can look for the Fine-Gray model. The cumulative incidence function is the generalization of Kaplan-Meier to competing risks.

Here is a link for a presentation that give background and other information. http://www.stata.com/meeting/australia09/aunz09_gutierrez.pdf


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.