A function to approximate the normalizing constant for COM-Poisson distributions via truncation. The standard COM-Poisson parametrization is being used here. Notice that the sum is hard coded to truncate at 100 so the approximation will be quite bad if the COM-Poisson has a large rate or mean.
Z(lambda, nu, log.z = FALSE, summax)
rate parameter, straightly positive
dispersion parameter, straightly positive
logical; if TRUE
, normalising constant \(Z\) are returned as
\(log(Z)\).
maximum number of terms to be considered in the truncated sum