So I am trying to compare between populuations and determine whether there is a difference in count based data.

My data look like this:

Individual    Population    Total_Reads    Positive_Reads
indiv1        A             14             5
indiv2        B             12             8
indiv3        C             15             8
indiv4        A             8              4
etc. with ~7 populations and ~6 individuals per population

and I would prefer to compare them in such a way that (a) I can identify what groups are significantly different from one another and (b) I retain the count-based nature of the data.

Does anybody have any suggestions or ideas? A friend of mine suggested a multivariate, binomial model which will produce an effect size for each population, but I'm not sure that will address the question.

  • $\begingroup$ To clarify, the idea is to determine if the proportion of Positive_Reads (given the number of Total_Reads) differs by Population, is that right? $\endgroup$ Jul 1, 2015 at 16:43
  • $\begingroup$ Yes. But to also keep in mind that the data for each population comes from multiple individuals, each of whom have an individual proprtion and uncertainty (as a consequence of read number). $\endgroup$
    – Jautis
    Jul 1, 2015 at 16:55

1 Answer 1


I would suggest to look on Mixed Effects Logistic Regression. I believe it's a common way to approach this question. The idea is that the probability of having a positive read :
- Is influenced by the population (fixed effects)
- Get noised by random effects. The most obvious one is at the scale of the individual : Some people would have a tendency to get more positive read than others, even if they are in the same population.

Your goal is to assess the significativity of your fixed effects. In r you would end up with something like

m <- glmer(cbind(Positive_Read,Total_Reads-Positive_Reads) ~ Population + (1 | Individual),family = binomial,data=mydata)

The first term ($Population$) is the fixed effects, the second term ($(1 | Individual)$) is a random intercept grouped by individual which explains the disparity between individuals by a random effect.

Disclaimer : I am currently a noob in Mixed Effects Logistic Regression. However I feel it's a legitimate way to address the problem. Maybe the specification of the random effects is incomplete, I picked the simplest form but I do not know if more sophisticated random effects could be specified here.

  • $\begingroup$ Hi, thanks for the answer! I think the Mixed Effects model is a good framework, but I'm not sure how well it will scale. I'm dealing with data where there can be dozens of reads per individual, eight individuals per population, six populations. My data is in the form of "total reads (tab) positive reads" so I'm not sure how easy that will be to convert to this format or how well the system will scale. (not to mention thousands of separate independent variables). $\endgroup$
    – Jautis
    Jul 7, 2015 at 20:33
  • $\begingroup$ I found a simpler solution to avoid reshaping your data and edited my answer. Considering your data, I still think Mixed Effects is possible there. But... "not to mention thousands of separate independent variables". If you have many IV, regressions are the way to go, but...**thousands** ? $\endgroup$
    – brumar
    Jul 8, 2015 at 7:49
  • $\begingroup$ Have a look on this q&a, you will find some similarity with your problem : stats.stackexchange.com/questions/89521/… $\endgroup$
    – brumar
    Jul 8, 2015 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.