AM_prior_K_NegBin: computes the prior number of clusters

Description Usage Arguments Details Value Examples

Description

This function computes the prior on the number of clusters, i.e. occupied component 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 unnormalized weights are distributed as Gamma(γ,1)). This function can be used when the prior on the number of components is Negative Binomial with parameter r>0 and 0<p<1, with mean mu =1+ r*p/(1-p). See \insertCiteargiento2019infinityAntMAN for more details.

Usage

1

Arguments

n

The sample size.

gamma

The gamma parameter of the Dirichlet distribution.

r

The dispersion parameter r of the Negative Binomial.

p

The probability of failure parameter p of the Negative Binomial.

Details

There are no default values.

Value

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

Examples

1
2
3
4
5
6
7
n <- 50
gamma <- 1
r <- 0.1
p <- 0.91
gam_nb <- 0.2381641
prior_K_nb <-  AM_prior_K_NegBin(n,gam_nb,r,p)
plot(prior_K_nb)

AntMAN documentation built on July 23, 2021, 5:08 p.m.