
Log Ewens sampling formula for a partition given by multiplicities
Source:R/bnp_ghosal.R
morie_gh_ewens_log.RdComputes \(\log\{n! / (\alpha)_n \prod_i \alpha^{m_i} /
(i^{m_i} m_i!)\}\), where multiplicities[i] is the number of
blocks of size i and the sample size \(n = \sum_i i m_i\) is
recovered from the multiplicities.
References
Ghosal, S. and van der Vaart, A. (2017). Fundamentals of Nonparametric Bayesian Inference. Cambridge University Press.
Examples
# a partition of n = 8 with three singletons, one pair and one triple
morie_gh_ewens_log(multiplicities = c(3, 1, 1), alpha = 2)
#> [1] -2.315008