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
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.
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.
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
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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.