Simulating of Beta-Binomial distribution

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 14
Accepted Solution

Simulating of Beta-Binomial distribution

Hi,

 

I would highly appreciate it if you could give me any guidance how I can simulate the joint Beta-binomial distribution.

 

Thank you in advance.

 

Regards,

Yuliya


Accepted Solutions
Solution
‎09-05-2016 05:16 AM
Occasional Contributor
Posts: 14

Re: Simulating of Beta-Binomial distribution

Hi everyone,

 

thank you very much for your help.

 

I simulated with both ways.

 

Have a nice weekend.

 

Regards,

 

Yuliya

View solution in original post


All Replies
Regular Contributor
Posts: 236

Re: Simulating of Beta-Binomial distribution

Occasional Contributor
Posts: 14

Re: Simulating of Beta-Binomial distribution

Hi,

 

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.

 

Regards,

Yuliya

 

SAS Super FREQ
Posts: 3,390

Re: Simulating of Beta-Binomial distribution

I think

Grand Advisor
Posts: 9,567

Re: Simulating of Beta-Binomial distribution

You should post it at IML forum.
Here is Gamma+Possion distribution:

http://blogs.sas.com/content/iml/2014/04/02/interpret-nb-distribution.html


Occasional Contributor
Posts: 14

Re: Simulating of Beta-Binomial distribution

Thank you very much!
Grand Advisor
Posts: 9,567

Re: Simulating of Beta-Binomial distribution

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;

Solution
‎09-05-2016 05:16 AM
Occasional Contributor
Posts: 14

Re: Simulating of Beta-Binomial distribution

Hi everyone,

 

thank you very much for your help.

 

I simulated with both ways.

 

Have a nice weekend.

 

Regards,

 

Yuliya

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 629 views
  • 5 likes
  • 4 in conversation