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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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