Skip to content

Preliminary code to test truncation algorithms for infinite series and their applications in Statistics.

License

Notifications You must be signed in to change notification settings

maxbiostat/truncation_tests

Repository files navigation

Test scripts for infinite series truncation algorithms

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).

About

Preliminary code to test truncation algorithms for infinite series and their applications in Statistics.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published