G_variance: 2nd Moment of Dirichlet / Pitman-Yor processes
Description
Calculates the variance in the 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.
Usage
G_variance(N, alpha, discount = 0L)
Arguments
N
The sample size.
alpha
The concentration parameter. Must be specified and must be strictly greater than -discount.
discount
The discount parameter for the Pitman-Yor process. Must lie in the interval [0, 1). Defaults to 0 (i.e. the Dirichlet process).
Value
The variance of the number of clusters under the specified prior conditions.