Calculates the expected number of clusters under a Dirichlet process or Pitman-Yor process prior for a sample of size N
at given values of the concentration parameter alpha
and optionally also the discount
parameter. Useful for soliciting sensible priors for alpha
or suitable fixed values for alpha
or discount
under the "IMFA
" and "IMIFA
" methods for mcmc_IMIFA
, All arguments are vectorised.
G_expected(N, alpha, discount = 0L)
The sample size.
The concentration parameter. Must be specified and must be strictly greater than -discount
.
The discount parameter for the Pitman-Yor process. Must lie in the interval [0, 1). Defaults to 0 (i.e. the Dirichlet process).
The expected number of clusters under the specified prior conditions.
# NOT RUN {
G_expected(N=50, alpha=19.23356)
# require("Rmpfr")
# G_expected(N=50, alpha=c(19.23356, 12.21619, 1), discount=c(0, 0.25, 0.7300045))
# }
Run the code above in your browser using DataLab