Accompanying code to the paper "Adaptive truncation of infinite sums: applications to Statistics" by Luiz Max Carvalho and Guido A. Moreira.
Note that the code provided here makes heavy use of our package sumR which is also on CRAN.
-
The importance of selecting the right algorithm: as this script demonstrates, when L > 1/2 one really ought to use the error-bounding ("adaptive") algorithm or Batches with a suitably chosen
batch_size
. -
Ever wondered how many iterations you would need to correctly approximate the normalising constant of the Conway-Maxwell Poisson distribution? This script computes it for a few values, extending the results in Figure 5 of Benson & Friel (2021) .
-
This script implements the marginal maximum likelihood estimation (MMLE) example with a toy queuing model. The basic idea is that you have a Poisson number of calls with exponential duration, but you only observe the total call time (i.e. their sum). A simulation study is implemented here and has a companion script to analyse it.
-
Tests where the true answer is known in closed form can be found in this folder. In particular, we provide tests for the factorial moments of a Poisson random variable (script) and the marginal probability in a size-independent (binomial) observation error model with a negative binomial count-generating distribution (script).