BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ammarhm
Lapis Lazuli | Level 10

Hi everyone, 

I am really struggling with the analysis of equality of variance as one of the assumptions of Poisson regression. 

Here is what I am doing:

 

proc glimmix data=have;
by group;
class disease sex;
effect yearspline=spline(year / naturalcubic knotmethod=equal(5));
effect agespline=spline(age / naturalcubic knotmethod=equal(5));
model events=disease sex aspl yspl / dist=poisson offset=logtime s cl link=log;
random _residual_/group=disease;
covtest homogeneity;
run;

I am doing the right thing with covtest? 

The result of 'test of covariance parameters based on residual pseudo likelihhod' is coming with a Homogeneity p value of <0.0001. Does that mean that there is significant difference in the variance between the 'disease' groups and that the quality of variance assumption for poisson regression is not met, and hence I should not be using this Poisson model? 

Thanks 

 

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

Yes, the Poisson assumes equal mean and variance. It is not uncommon for the variance to exceed the mean and this is known as overdispersion. Underdispersion (variance less than the mean) can also happen but is less common. The negative binomial distribution has an extra component that can accommodate the inequality, so it is often used with overdispersed data. But you can also use it as a test for overdispersion by testing that the extra variance component is zero. You do this by specifying the DIST=NEGBIN SCALE=0 NOSCALE options in the MODEL statement in PROC GENMOD. Overdispersion is indicated if the additional test that it presents is significant. This note discusses overdispersion and various strategies for this situation.

View solution in original post

3 REPLIES 3
StatDave
SAS Super FREQ

Equal variances are only assumed for models on normally distributed responses. Poisson regression and most other generalized linear models do not make this assumption. See this note

ammarhm
Lapis Lazuli | Level 10

Thank you @StatDave  you are absolutely correct, my bad, i should have siad 'equality of variance and mean'.

So what i am actually trying to do is to test the assumption that  the mean and variance are equal in my data/model...

Any suggestions/thoughts on how to do that and if my code up is right?

Thank you

 

StatDave
SAS Super FREQ

Yes, the Poisson assumes equal mean and variance. It is not uncommon for the variance to exceed the mean and this is known as overdispersion. Underdispersion (variance less than the mean) can also happen but is less common. The negative binomial distribution has an extra component that can accommodate the inequality, so it is often used with overdispersed data. But you can also use it as a test for overdispersion by testing that the extra variance component is zero. You do this by specifying the DIST=NEGBIN SCALE=0 NOSCALE options in the MODEL statement in PROC GENMOD. Overdispersion is indicated if the additional test that it presents is significant. This note discusses overdispersion and various strategies for this situation.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 1342 views
  • 5 likes
  • 2 in conversation