Fine-Gray vs Cause-Specific Cox Regression

Hi all,

I am analyzing competing risks data in R and want to confirm that I’m setting up both Fine-Gray and cause-specific Cox regression correctly and that I understand the practical differences between outcome of interest vs competing event.

My dataset encodes the event status as:

status = 1: outcome of interest

status = 2: competing event

status = 0: censored (alive without either event)

For the Fine-Gray models, I use tidycmprsk::crr() as follows:

library(cmprsk)
library(tidycmprsk)

# sHR for outcome of interest
crr(Surv(followup, status) ~ cont1 + cont2 + cont3 + categ1 + categ2 + categ3, 
    data = d, failcode = 1)

# sHR for competing event
crr(Surv(followup, status) ~ cont1 + cont2 + cont3 + categ1 + categ2 + categ3, 
    data = d, failcode = 2)

My understanding is that:

failcode = 1 gives subdistribution hazard ratios (sHRs) for the outcome of interest,failcode = 2 gives sHRs for the competing event.

For the cause-specific hazard models, I use survival::coxph() as:

library(survival)
# csHR for outcome of interest
coxph(Surv(followup, status == 1) ~ cont1 + cont2 + cont3 + categ1 + categ2 + categ3, data = d)

# csHR for competing event
coxph(Surv(followup, status == 2) ~ cont1 + cont2 + cont3 + categ1 + categ2 + categ3, data = d)

In this case, events not equal to the specified code are treated as censored.

My question:

  1. Am I correct that failcode = 1 and failcode = 2 in crr() give sHRs for the outcome of interest and the competing event, respectively?
  2. Is my approach to cause-specific Cox regression correct, i.e., using status == 1 or status == 2 inside Surv() to define the event of interest while treating other causes as censored?

Excuse my code-oriented question but I am really trying to understand what distinguishes in practice the sHR/csHR between the outcome of interest vs the competing event (since they are almost always presented together).

Thanks in advance for any clarification!

1 Like