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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1186 views
  • 0 likes
  • 5 in conversation