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 <[email protected]>

References

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


jreduardo/cmpreg documentation built on May 14, 2019, 11:05 p.m.