A Cox model for one cause, treating every competing event as
censored. This is the AETIOLOGICAL question – what drives the rate
of this cause among those still at risk of it.
Usage
morie_cause_specific_hazard(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, z, p_value,
hazard_ratio, loglik, plus the event counts by type.
Details
It is not the incidence question, and the standard error is not the
issue: \(1 - \exp(-\Lambda)\) from a cause-specific fit OVERSTATES
the actual probability of the event, because it implicitly assumes
the competing events could be prevented. Use
morie_competing_risks_fg when the quantity of interest
is risk.
References
Prentice, R. L. et al. (1978). The analysis of failure
times in the presence of competing risks. Biometrics, 34(4),
541-554.
Examples
set.seed(3)
X <- matrix(rnorm(200), ncol = 2)
tt <- rexp(100)
ct <- sample(0:2, 100, TRUE)
morie_cause_specific_hazard(tt, ct, X)$hazard_ratio
#> [1] 0.8564666 0.8795239