A function to approximate the normalizing constant for COM-Poisson distributions via truncation. The standard COM-Poisson parametrization is being used here.
Value
A numeric vector giving the (approximate) log of the COM-Poisson
normalizing constant \(\log Z(\lambda, \nu)\), recycled to the length of
the longer of log_lambda and nu.
Details
As of version 0.2.0 of this package, logZ will supersede Z for calculating
the normalizing constant. logZ utilised a method that can calculate
log(exp(logx) + exp(logy)) in a somewhat numerically stable way.
This function was originally purposed in the cmpreg package of Ribeiro Jr,
Zeviani & Demétrio (2019).