AM_prior_K_NegBin: This function compute the prior on the number of cluster,...

Description Usage Arguments Value Examples

Description

There are no default values.

Usage

1

Arguments

n

The sample size

gamma

The gamma parameter of the Dirichlet

r

The dispersion parameter r of Negative Binomial

p

The probability of failure parameter p of Negative Binomial

Value

A vector of length n, reporting the values V(n,k) for k=1,...,n

Examples

1
2
3
4
5
6
7
8
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(1:n,prior_K_nb, type = "n", bty = "l", xlab = "k", ylab = "P(K=k)")
lines(1:n,prior_K_nb,type="h",lwd=2)

AntMAN documentation built on Oct. 30, 2019, 11:24 a.m.