Skip to contents

A weighted Cox model on the subdistribution hazard. Subjects who have already failed from a competing cause REMAIN in the risk set, with inverse-probability-of-censoring weights; that retention is what makes the fitted model map directly onto cumulative incidence, and it is also what makes the coefficient hard to interpret mechanistically.

Usage

morie_competing_risks_fg(time, event_type, X, cause = 1, ties = "efron")

Arguments

time

follow-up times.

event_type

0 for censored, cause for the event of interest, any other value for a competing event.

X

covariate matrix.

cause

the cause to model.

ties

"efron" or "breslow".

Value

list with beta, se, p_value, subdistribution_hazard_ratio, weights, loglik.

Details

A Fine-Gray hazard ratio is a statement about RISK, not about mechanism. Report it beside the cause-specific fit rather than instead of it; when the two disagree, the disagreement is the finding.

References

Fine, J. P. and Gray, R. J. (1999). A proportional hazards model for the subdistribution of a competing risk. JASA, 94(446), 496-509.

Examples

set.seed(3)
X <- matrix(rnorm(200), ncol = 2)
tt <- rexp(100)
ct <- sample(0:2, 100, TRUE)
morie_competing_risks_fg(tt, ct, X)$subdistribution_hazard_ratio
#> [1] 0.8727418 0.8631077