Generates random draws from the zero-truncated Beta-Binomial via rejection sampling on the standard Beta-Binomial.
Details
The function is vectorised over n, mu, and kappa
using a parameter-grouping strategy. Unique parameter combinations are
identified, and rejection sampling is performed once per group with
smart batch sizing based on the analytical \(p_0\).
References
Ghosal, S., Ghosh, S., and Moores, M. (2020). “Hierarchical beta-binomial models for batch effects in cytometry data.” Journal of the Royal Statistical Society: Series A, 183(4), 1579–1601.
See also
Other distributions:
compute_p0(),
compute_ztbb_mean(),
dbetabinom(),
dhurdle_betabinom(),
dztbetabinom(),
hurdle_mean(),
hurdle_variance(),
pbetabinom(),
rbetabinom(),
rhurdle_betabinom()