Skip to contents

The only change from the ordinary estimator is the risk set: a subject enters at entry rather than at time zero, so it is at risk only over (entry, time].

Usage

Ltkm(entry, time, event, alpha = 0.05)

morie_survival_left_truncated_km(entry, time, event, alpha = 0.05)

Arguments

entry

entry (truncation) times.

time

observed follow-up times.

event

event indicator, 1 = event, 0 = censored.

alpha

significance level for the interval.

Value

list with the survival estimate, its standard error, the confidence interval and the risk-set sizes.

References

Klein, J. P. and Moeschberger, M. L. (2003). Survival Analysis, 2nd ed., Springer, Section 3.4.

Examples

ST <- c(5, 6, 6, 2.5, 4, 4, 3, 3, 1, 2, 2, 3, 7, 8, 9, 10)
SE <- c(1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1)
en <- c(0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2)
Ltkm(en, ST, SE)
#> $time
#>  [1]  1.0  2.0  2.5  3.0  4.0  5.0  6.0  7.0  9.0 10.0
#> 
#> $surv
#>  [1] 0.8750000 0.7954545 0.7342657 0.5506993 0.4895105 0.4195804 0.3496503
#>  [8] 0.2622378 0.1311189 0.0000000
#> 
#> $se
#>  [1] 0.1169268 0.1305807 0.1341082 0.1361643 0.1340803 0.1319075 0.1271150
#>  [8] 0.1217363 0.1109099 0.0000000
#> 
#> $n_risk
#>  [1]  8 11 13 12  9  7  6  4  2  1
#> 
#> $n_event
#>  [1] 1 1 1 3 1 1 1 1 1 1
#> 
#> $lower
#>  [1] 0.64582770 0.53952104 0.47141853 0.28382213 0.22671796 0.16104647
#>  [7] 0.10050950 0.02363903 0.00000000 0.00000000
#> 
#> $upper
#>  [1] 1.0000000 1.0000000 0.9971129 0.8175765 0.7523030 0.6781144 0.5987912
#>  [8] 0.5008365 0.3484983 0.0000000
#> 
#> $ignoring_truncation
#>  [1] 0.9375000 0.8750000 0.8076923 0.6057692 0.5384615 0.4615385 0.3846154
#>  [8] 0.2884615 0.1442308 0.0000000
#> 
#> $max_difference
#> [1] 0.07954545
#> 
#> $empty_risk_sets
#> numeric(0)
#> 
#> $n
#> [1] 16
#> 
#> $n_events
#> [1] 12
#> 
#> $method
#> [1] "Kaplan-Meier with the risk set restricted to entry < t <= time"
#>