08-31-2016 03:30 AM
thank you very much. Unfortunately, there is only ine part of the book with the simplest simulations. I need to simulate a joint distribution Beta - binomial. Any ideas?
Thank you again.
08-31-2016 09:40 AM
If you read and understand the blog the @Ksharp linked to, you should have no problem modifying it to the beta-binomial. Start there, and post again if you have a particular question.
08-31-2016 11:08 AM
OK. Here is Beta-Binomial distribution. Beta-Binomial is usually for Overdispersion Models . data have; pi=0.3; Rho=0.2; m=30; c=(1-Rho**2)/(Rho**2) ; a=c*pi; b=c*(1-pi); call streaminit(1234); do i=1 to 1000000; p=rand('beta',a,b); x=rand('binomial',p,m); output; end; keep x; run; proc sgplot data=have; vbar x / stat=percent; run;
10-26-2017 12:02 AM
I could not find PDF, CDF, and inverse CDF call functions for beta binomial in SAS. I appreciate your help in determining all possible values of unknown parameters, say eta1 and eta2 (reparameterized parameters) that satisfies two inverse beta binomial functions simultaneously. For example, if the inverse CDF of beta binomial is Q, then how we can solve the following equations together for eta1 and eta2 :
6=Q(0.8, eta1,eta2) and 2=Q(0.1,eta1,eta2) and once we have these values, how we can keep them to be used in a following step in the program.
10-26-2017 10:44 AM
This thread is old and SOLVED (closed). It contains a link to a blog post that describes how to simulate from a compound distribution. The beta-binomial distribution is compound, so to generate random draws from the beta-binomial you can first draw p from a beta distribution and then draw X from the binomial(p) distribution.
11-01-2017 05:40 AM
01-24-2018 05:42 AM
See the article "Simulate data from the beta-binomial distribution in SAS."
If you also need the PDF, CDF, and quantile functions, see the article "Compute the CDF and quantiles of discrete distributions."
Need further help from the community? Please ask a new question.