Could someone help me find a random number generator from a Beta-Binomial distribution in MATLAB, R or SAS?
Thank you!
Could someone help me find a random number generator from a Beta-Binomial distribution in MATLAB, R or SAS?
Thank you!
Copyright © 2021 JogjaFile Inc.
According to the Wikipedia, the beta-binomial is a compound distribution, namely, it's like a binomial distribution in which the $p$ parameter is randomly drawn from a beta distribution.
Matlab's Statistic Toolbox has functions to generate binomial random numbers (
binornd; see its documentation) and beta-distributed random numbers (betarnd; see its documentation), so it should be pretty straightforward.