H(t) = sum_{s <= t} dH(s) with independent
dH(s_k) ~ Be(c_k h_k, c_k(1 - h_k)). The Beta parameterisation is
chosen so that E dH(s_k) = h_k EXACTLY, whatever c is: c controls only
the spread, so the prior mean hazard can be specified without
committing to a strength. The simulated means recover h_k.
Usage
Ghosalbpdiscrete(hazards0 = c(0.1, 0.2, 0.3), c = 4, seed = 42)
Arguments
- hazards0
Prior mean hazards, each strictly inside (0, 1).
- c
Concentration, positive.
- seed
Seed for the deterministic draws.
Value
List with estimate (sum of the simulated means),
mean_by_time, prior_mean_gap, method.
Details
Formula: E Be(c h, c(1 - h)) = h.
References
Ghosal & van der Vaart (2017), Fundamentals of
Nonparametric Bayesian Inference, CUP, section 13.3.1.
Examples
# \donttest{
Ghosalbpdiscrete()
#> $estimate
#> [1] 0.5915069
#>
#> $mean_by_time
#> [1] 0.0970933 0.1946829 0.2997307
#>
#> $prior_mean_gap
#> [1] 0.005317141
#>
#> $method
#> [1] "discrete beta process (GvdV 2017 sec. 13.3.1)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
# }