## binomial unequal group sizes

Solved
Occasional Contributor
Posts: 16

# binomial unequal group sizes

Dear all,

If you have binomial data for which the group sizes differ, how do you correct for it in proc glimmix?

For example:

proc glimmix data=name;

class var1 var2;

model y/n=var1 var2 / dist=binomial link=logit;

random randomvariable;

run;

y is for example the number of affected individuals per group that differs in size (n). I have been told that you can correct for this by adding an overdispersion parameter 'random _residual_;' but I am not too confident about this. Anyone have any ideas? Thanks in advance.

Accepted Solutions
Solution
‎10-16-2015 05:23 PM
Valued Guide
Posts: 684

## Re: binomial unequal group sizes

You don't need to correct for this -- it is automatically taken care of. Do not use the 'random _residual_" statement for this purpose (this is for overdispersion: high variability than one would obtain with a binomial distribution).

All Replies
Solution
‎10-16-2015 05:23 PM
Valued Guide
Posts: 684

## Re: binomial unequal group sizes

You don't need to correct for this -- it is automatically taken care of. Do not use the 'random _residual_" statement for this purpose (this is for overdispersion: high variability than one would obtain with a binomial distribution).

Super Contributor
Posts: 301

## Re: binomial unequal group sizes

Agree. And further, since the random-statement is not neccessary, it may be better to use a procedure (proc logistics) that is specialized for logistic regression.
Occasional Contributor
Posts: 16

## Re: binomial unequal group sizes

[ Edited ]

Thanks, thought it was a bit weird to correct for unequal sizes using an overdispersion parameter. Good to hear a confirmation that it is not necessary to do so.

🔒 This topic is solved and locked.