Skip to contents

Self-consistency (EM) for the nonparametric MLE. Mass sits only on the maximal intersections of the observed intervals, so the estimator is a step function that jumps nowhere else.

Usage

Turnbull(left, right, max_iter = 1000L, tol = 1e-10)

morie_survival_turnbull(left, right, max_iter = 1000L, tol = 1e-10)

Arguments

left

left endpoints of the censoring intervals.

right

right endpoints; use Inf for right-censored observations.

max_iter

maximum EM iterations.

tol

convergence tolerance.

Value

list with the estimated masses, the intersection intervals, the survival curve and the iteration count.

References

Turnbull, B. W. (1976). The empirical distribution function with arbitrarily grouped, censored and truncated data. JRSS-B 38(3), 290-295.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Turnbull(V, V)
#> $intervals
#> $intervals[[1]]
#> [1] 1 1
#> 
#> $intervals[[2]]
#> [1] 2 2
#> 
#> $intervals[[3]]
#> [1] 3 3
#> 
#> $intervals[[4]]
#> [1] 4 4
#> 
#> $intervals[[5]]
#> [1] 5 5
#> 
#> $intervals[[6]]
#> [1] 6 6
#> 
#> $intervals[[7]]
#> [1] 7 7
#> 
#> $intervals[[8]]
#> [1] 8 8
#> 
#> 
#> $mass
#> [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
#> 
#> $loglik
#> [1] -16.63553
#> 
#> $iterations
#> [1] 1
#> 
#> $change
#> [1] 0
#> 
#> $converged
#> [1] TRUE
#> 
#> $ambiguous_intervals
#> $ambiguous_intervals[[1]]
#> [1] 1 1
#> 
#> $ambiguous_intervals[[2]]
#> [1] 2 2
#> 
#> $ambiguous_intervals[[3]]
#> [1] 3 3
#> 
#> $ambiguous_intervals[[4]]
#> [1] 4 4
#> 
#> $ambiguous_intervals[[5]]
#> [1] 5 5
#> 
#> $ambiguous_intervals[[6]]
#> [1] 6 6
#> 
#> $ambiguous_intervals[[7]]
#> [1] 7 7
#> 
#> $ambiguous_intervals[[8]]
#> [1] 8 8
#> 
#> 
#> $n
#> [1] 8
#> 
#> $n_intervals
#> [1] 8
#> 
#> $npmle_not_unique_within_intervals
#> [1] TRUE
#> 
#> $method
#> [1] "Turnbull (1976) self-consistency / EM"
#>