AM_mix_components_prior_negbin: Generate a configuration object for a Shifted Negative...

Description Usage Arguments Details Value See Also Examples

View source: R/AM_mix_components_prior.R

Description

This generates a configuration object for a Shifted Negative Binomial prior on the number of mixture components such that

q_M(m)=Pr(M=m) =\frac{Γ(r+m-1)}{(m-1)!Γ(r)} p^{m-1}(1-p)^r, \quad m=1,2,3,…

The hyperparameters p\in (0,1) (probability of success) and r>0 (size) can either be fixed using r and p or assigned appropriate prior distributions. In the latter case, we assume p \sim Beta(a_P,b_P) and r \sim Gamma(a_R,b_R). In AntMAN we assume the following parametrization of the Gamma density:

p(x\mid a,b )= \frac{b^a x^{a-1}}{Γ(a)} \exp\{ -bx \}, \quad x>0.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
AM_mix_components_prior_negbin(
  a_R = NULL,
  b_R = NULL,
  a_P = NULL,
  b_P = NULL,
  R = NULL,
  P = NULL,
  init_R = NULL,
  init_P = NULL
)

Arguments

a_R

The shape parameter a of the Gamma(a,b) prior distribution for r.

b_R

The rate parameter b of the Gamma(a,b) prior distribution for r.

a_P

The parameter a of the Beta(a,b) prior distribution for p.

b_P

The parameter b of the Beta(a,b) prior distribution for p.

R

It allows to fix r to a specific value.

P

It allows to fix p to a specific value.

init_R

The initial value of r, when specifying a_R and b_R.

init_P

The inivial value of p, when specifying a_P and b_P.

Details

If no arguments are provided, the default is r = 1 , a_P = 1, b_P = 1.

Additionally, when init_R and init_P are not specified, there are default values: init_R = 1 and init_P = 0.5.

Value

An AM_mix_components_prior object. This is a configuration list to be used as mix_components_prior argument for AM_mcmc_fit.

See Also

AM_mcmc_fit

Examples

1
2
AM_mix_components_prior_negbin (R=1, P=1)
AM_mix_components_prior_negbin ()

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