Skip to contents

Beta-process posterior survival (Hjort 1990)

Usage

morie_ghosal_survival_beta_process(time, event = NULL, c = 1, lam0 = NULL)

Arguments

time

Numeric vector of observed times.

event

Optional integer/logical event indicator (1 = event, 0 = censored).

c

Numeric prior concentration (default 1).

lam0

Optional baseline hazard rate.

Value

Named list with estimate, times, S_post, H_post, c, lam0, n, method.

Examples

set.seed(1)
morie_ghosal_survival_beta_process(time = cumsum(rexp(50)))
#> $estimate
#> [1] 0.4963296
#> 
#> $times
#>  [1]  0.7551818  1.9368246  2.0825313  2.2223266  2.6583952  5.5533638
#>  [7]  6.7829258  7.3226087  8.2791762  8.4262221  9.8169573 10.5789871
#> [13] 11.8165907 16.2405249 17.2950681 18.3303120 20.2063472 20.8610938
#> [19] 21.1980273 21.7865070 24.1510223 24.7929149 25.0870352 25.6529008
#> [25] 25.7589734 25.8184126 26.3971250 30.3560579 31.5293700 32.5261829
#> [31] 33.9614683 33.9987368 34.3227470 35.6432149 35.8467252 36.8694511
#> [37] 37.1711920 37.8964063 38.6479490 38.8829765 39.9628576 40.9911045
#> [43] 42.2833662 43.5364715 44.0911129 44.3923959 45.6855206 46.6800764
#> [49] 47.1942507 49.2020831
#> 
#> $S_post
#>  [1] 0.97981977 0.95932827 0.93963987 0.91995826 0.90005474 0.87829873
#>  [7] 0.85785331 0.83794991 0.81774214 0.79816142 0.77764751 0.75763365
#> [13] 0.73727778 0.71455781 0.69445819 0.67439572 0.65372995 0.63401596
#> [19] 0.61455313 0.59491147 0.57396673 0.55435978 0.53502659 0.51550053
#> [25] 0.49632964 0.47719617 0.45768132 0.43569290 0.41589056 0.39625803
#> [31] 0.37634170 0.35749750 0.33844618 0.31868387 0.29979029 0.28031266
#> [37] 0.26140718 0.24221180 0.22303885 0.20428342 0.18493697 0.16570820
#> [43] 0.14637645 0.12719309 0.10863308 0.09031671 0.07135045 0.05282707
#> [49] 0.03486805 0.01608091
#> 
#> $H_post
#>  [1] 0.02018023 0.04109377 0.06161688 0.08256279 0.10419804 0.12836991
#>  [7] 0.15164834 0.17484974 0.19896547 0.22291033 0.24861178 0.27434819
#> [13] 0.30121589 0.33203191 0.36016067 0.38905005 0.41969345 0.44984961
#> [19] 0.48054731 0.51250819 0.54771468 0.58187510 0.61674991 0.65324540
#> [25] 0.69043430 0.72898421 0.76987902 0.81792211 0.86337232 0.91057833
#> [31] 0.96083936 1.01091139 1.06420216 1.12259346 1.18187974 1.24685060
#> [37] 1.31429487 1.38772583 1.46688361 1.55097403 1.64567796 1.74965270
#> [43] 1.86631413 1.99736904 2.14328903 2.31189673 2.52189398 2.78150522
#> [49] 3.12146376 3.66027055
#> 
#> $c
#> [1] 1
#> 
#> $lam0
#> [1] 0.03865541
#> 
#> $n
#> [1] 50
#> 
#> $method
#> [1] "Beta-process posterior survival (Hjort 1990)"
#>