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;
Need further help from the community? Please ask a new question.