Skip to contents

Right censoring destroys the conjugacy that makes the DP posterior a DP: what survives is a product-limit form in which each risk set contributes one Beta-posterior factor. That product is the Bayesian analogue of Kaplan-Meier, and the prior enters only through the prior-mean survival S0 attached to each factor.

Usage

Ghosalsurvdppost(times, events, t_query, alpha = 2)

Arguments

times

Observed follow-up times.

events

Event indicators, 1 for an event and 0 for censoring.

t_query

Time at which the survival is reported.

alpha

DP concentration, positive.

Value

List with estimate, survival_at_t, method.

Details

Formula: S(t) = prod over events t_j <= t of (alpha S0(t_j) + R_j - 1) / (alpha S0(t_j) + R_j), with S0 the unit-exponential survival and R_j the risk set size.

References

Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, section 13.2.

Examples

times <- c(2, 3, 3, 5, 6, 8, 9, 12); events <- c(1, 1, 0, 1, 0, 1, 1, 0)
Ghosalsurvdppost(times, events, t_query = 6, alpha = 2)$survival_at_t
#> [1] 0.6046202