Learn R Programming

AntMAN (version 1.1.0)

AM_prior_K_Delta: Computes the prior on the number of clusters

Description

This function computes the prior on the number of clusters, i.e. occupied components of the mixture for a Finite Dirichlet process when the prior on the component-weights of the mixture is a Dirichlet with parameter gamma (i.e. when unnormalised weights are distributed as Gamma(\(\gamma\),1)). This function can be used when the number of components is fixed to \(M^*\), i.e. a Dirac prior assigning mass only to \(M^*\) is assumed. See argiento2019infinityAntMAN There are no default values.

Usage

AM_prior_K_Delta(n, gamma, Mstar)

Arguments

n

The sample size.

gamma

The gamma parameter of the Dirichlet distribution.

Mstar

The number of component of the mixture.

Value

an AM_prior object, that is a vector of length n, reporting the values V(n,k) for k=1,...,n.

Examples

Run this code
# NOT RUN {
n <- 82
gam_de <- 0.1743555
Mstar <- 12
prior_K_de <- AM_prior_K_Delta(n,gam_de, Mstar)
plot(prior_K_de)
# }

Run the code above in your browser using DataLab