turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Simulating of Beta-Binomial distribution

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2016 12:57 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-01-2016 02:30 PM

Hi everyone,

thank you very much for your help.

I simulated with both ways.

Have a nice weekend.

Regards,

Yuliya

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2016 01:27 AM

See if this pdf help you

https://www.sas.com/storefront/aux/en/spsimulationofdata/65378_excerpt.pdf

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2016 03:30 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2016 09:40 AM

I think @RahulG's intent was to point you to the book Simulating Data with SAS, rather than suggest that your answer was found in the free chapter.

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2016 03:38 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2016 04:01 AM

Thank you very much!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

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;

Solution

09-05-2016
05:16 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-01-2016 02:30 PM

Hi everyone,

thank you very much for your help.

I simulated with both ways.

Have a nice weekend.

Regards,

Yuliya