nbconv was written evaluation of the sums of arbitrary negative binomial (NB) random variables. nbconv implements five distinct methods for approaching this problem:
Girondot and Barry nicely summarize methods 1, 4, and 5. They moreover describe a clever approach to automate the selection of the number of terms included in Furman's series representation. Their approach is implemented in v2.0.0 of this software. The hybrid method described above marries speed and accuracy. As such, it is the default method used in nbconv's evaluation functions.
Like other distribution functions in R, nbconv has density, distribution, and quantile functions. These are dnbconv(), pnbconv(), and qnbconv(), respectively. Random deviates can be sampled with rnbconv(). Importantly, these deviates are derived independently of any evaluation method. Finally, nbconv_params() explicitly calculates the mean, variance, skewness, and excess kurtosis of convolutions using cumulants.
See the manual for more information and please do not hesitate to reach out with any questions or comments.
You can install the development version of nbconv from GitHub with:
# install.packages("devtools")
# devtools::install_github("gbedwell/nbconv")
install.packages("nbconv", repos = c('https://gbedwell.r-universe.dev', 'https://cloud.r-project.org'))