
Left-truncated Kaplan-Meier with delayed entry.
Source:R/survival.R
morie_survival_left_truncated_km.RdLeft-truncated Kaplan-Meier with delayed entry.
Value
A named list with elements times, survival, ci_lower, ci_upper, at_risk, events, censored, method.
Examples
set.seed(1)
entry <- runif(60, 0, 0.3); exit <- entry + rexp(60)
event <- rbinom(60, 1, 0.7)
str(morie_survival_left_truncated_km(entry, exit, event), max.level = 1)
#> List of 8
#> $ times : num [1:37] 0.267 0.347 0.383 0.474 0.505 ...
#> $ survival: num [1:37] 0.981 0.964 0.946 0.927 0.908 ...
#> $ ci_lower: num [1:37] 0.945 0.915 0.888 0.86 0.834 ...
#> $ ci_upper: num [1:37] 1 1 1 0.999 0.988 ...
#> $ at_risk : num [1:37] 53 56 54 50 49 46 45 44 43 41 ...
#> $ events : num [1:37] 1 1 1 1 1 1 1 1 1 1 ...
#> $ censored: num [1:37] 0 0 0 0 0 0 0 0 0 0 ...
#> $ method : chr "Left-truncated Kaplan-Meier"