compute_logz: Compute COM-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_logz(loglambda, nu)

Arguments

loglambda

A vector of logarithm of the λ parameter.

nu

A vector of dispersion parameters ν.

Details

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

Value

A vector with the logarithms of the resulting constants.

Author(s)

Eduardo Jr <edujrrib@gmail.com>

References

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


JrEduardo/cmpreg documentation built on May 8, 2019, 4:41 p.m.