compute_logk: Compute Double Poisson normalizing constante in log scale

Description Usage Arguments Details Value Author(s) References

Description

Computes the normalizing constant in the log scale usign the LogSumExp trick to avoid numerical issues (See details).

Usage

1
compute_logk(mu, lmu, phi, lphi)

Arguments

mu

a vector of the μ parameter.

lmu

logarithm of μ.

phi

value of \varphi parameter.

lphi

logarithm of \varphi.

Details

logspace_add(a, b) = log(exp(a) + exp(b)) = b + log(1 + exp(a - b)), where b > a.

Value

The normalizing constant.

Author(s)

Eduardo Jr <edujrrib@gmail.com>

References

Wikipedia, LogSumExp. http://rstudio.com.


jreduardo/flexcm documentation built on May 8, 2019, 12:41 p.m.