# Fine-Gray vs Cause-Specific Cox Regression

**URL:** <https://discourse.datamethods.org/t/fine-gray-vs-cause-specific-cox-regression/28387>\
**Category:** data analysis\
**Tags:** survival-analysis, design, interpretation\
**Created:** [September 11, 2025, 11:24am UTC](https://discourse.datamethods.org/t/fine-gray-vs-cause-specific-cox-regression/28387 "2025-09-11T11:24:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgkirgkiris](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/kgkirgkiris/32/5510_2.png) [@kgkirgkiris](https://discourse.datamethods.org/u/kgkirgkiris)\
**Post date:** [September 11, 2025, 11:24am UTC](https://discourse.datamethods.org/t/fine-gray-vs-cause-specific-cox-regression/28387/1 "2025-09-11T11:24:55Z")

</div>

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:

```auto
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:

```auto
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!
