Skip to contents

Formula: F_k(t) = integral S(u-) lambda_k(u) du

Usage

Crrcim(time, event_type, cause = 1)

Arguments

time

Follow-up time per subject.

event_type

0 for censored, otherwise the cause label.

cause

Cause of interest.

Value

List with estimate, time, cif, surv, n_risk, n_event, n, method.

Details

The Aalen-Johansen estimator. With a single cause and no competing event it collapses to exactly 1 - KM(t), the identity used to check it; with competing events it stays below that, because a subject who fails of another cause can never fail of this one.

References

Kalbfleisch & Prentice (2002), The Statistical Analysis of Failure Time Data, 2nd ed., Wiley, section 8.2; Aalen & Johansen (1978), Scand. J. Statist. 5(3):141-150.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Crrcim(V, V)
#> $estimate
#> [1] 0.125
#> 
#> $time
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $cif
#> [1] 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
#> 
#> $surv
#> [1] 0.875 0.750 0.625 0.500 0.375 0.250 0.125 0.000
#> 
#> $n_risk
#> [1] 8 7 6 5 4 3 2 1
#> 
#> $n_event
#> [1] 1 0 0 0 0 0 0 0
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Aalen-Johansen cumulative incidence function"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"