BookmarkSubscribeRSS Feed
vdfdd
Fluorite | Level 6

Please I need suggestions on how to simulate count data from a Poisson distribution and fit (using PROC GLIMMIX) Normal, lognormal and negbin to the resulting data.Thank you

10 REPLIES 10
vdfdd
Fluorite | Level 6

Thank you for your swift response.

StatDave
SAS Super FREQ

Use the RAND('POISSON', mean) function in the DATA step to generate Poisson distributed data. Just set the desired value of the Poisson mean to produce a set of values. For example, these statements produce 100 observations in which Y has Poisson distributed values with mean=2.

 

data s;
do i=1 to 100;
y=rand("poisson",2);
output;
end;
run;
PeterClemmensen
Tourmaline | Level 20

Are you sure PROC GLIMMIX is the right tool for fitting this data?

vdfdd
Fluorite | Level 6

I am not completely sure. I was looking at the example in this link: https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_sec...

Reeza
Super User

What are you trying to do overall? Why the need to simulate data?

 


@vdfdd wrote:

I am not completely sure. I was looking at the example in this link: https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_sec...


 

vdfdd
Fluorite | Level 6
To test which distribution best fit the (non-normal, discrete) data
Reeza
Super User

PROC UNIVARIATE can test this with histogram statements. 

vdfdd
Fluorite | Level 6

Thank you for your suggestion.

Ksharp
Super User

You could find answer at  @Rick_SAS  blog.

http://blogs.sas.com/content/iml/

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 10 replies
  • 1587 views
  • 0 likes
  • 5 in conversation