f(x) = sum_k (p_k / |B_k|) 1{x in B_k} with the bin probabilities Dirichlet. It is the simplest density prior that is genuinely nonparametric, and the Dirichlet vector is drawn by normalising independent gammas – the standard route, and the one the book's Proposition G.2 licenses.
Details
Formula: g_k ~ Gamma(alpha, 1), p = g / sum(g), f(x) = p_{b(x)} K on [0, 1] with K equal-width bins.
References
Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, section 2.3.2.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Ghosalhistogramprior(V)
#> $estimate
#> [1] 0.001102661
#>
#> $density
#> [1] 0.00882129 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
#> [8] 0.00000000
#>
#> $weights
#> [1] 0.121626960 0.299672786 0.139076555 0.104575019 0.011474128 0.299866805
#> [7] 0.022605085 0.001102661
#>
#> $method
#> [1] "Dirichlet histogram prior (GvdV 2017 sec. 2.3.2)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
