enter image description hereenter image description hereI have a big dataset (first 36 samples in image below) with proportion data (Proportion) that refer to the substrate that some insects eat: for example sample 1 eats 100% wood, sample 25 eats apx 81% wood. These data originate from counts which I transformed to proportions in order to be able to merge with some older data (that were already proportions). As a result of that not every sample is independent because for example samples 19 and 30 refer to the same insect, which does not eat any wood (0%) but eats exclusively (100%) soil.

I would like to examine the effects of the type of substrate and the group (phylogeny) the insects belong to. And in order to do that I would like to fit everything in a model. After looking around a little bit, I realized that my options are either beta regression or glm binomial. I already tried a glm-binomial model but the results made no sense at all! Categories that I expected to see huge differences (and be highly significant) were not significant at all...

On the other hand, I was under the impression that I cannot use beta regression because I have lots of '1' and '0'

Any advice on what to do and how to do it will be greatly appreciated... :)

enter image description here

  • 1
    $\begingroup$ You may want to look at Dirichlet regression, which is specifically good for composition data cran.r-project.org/web/packages/DirichletReg/index.html $\endgroup$ Nov 9, 2017 at 19:54
  • $\begingroup$ Can your huge differences be demonstrated in a simple overview of the data? What went wrong with the binomial data? How did you set it up? $\endgroup$ Nov 9, 2017 at 19:56
  • $\begingroup$ How does your data really look like? Your current display of the first 36 samples does not show the relation between sample 19 and 30. Do you have somewhere else more data about your experiments? What is exactly known? Or not known, for instance are there gaps in the data? $\endgroup$ Nov 9, 2017 at 20:01
  • $\begingroup$ thanks everyone for the quick responses. I tried to do it in R using sth like this: code fit <- glm(delta.CT$Value ~ interaction, family=binomial, data=all_forage) $\endgroup$ Nov 9, 2017 at 20:19
  • $\begingroup$ I have now added a figure on top showing how the data look after fitting them in that binomial glm. As you can see (i guess) the biggest problem is the huge error bars that I get for the categories that are absolutely 0. I guess i could solve that by adding sth like 0.0001 to every value? or is this too arbitrary? In addition, I am still not convinced that what I am doing is the right approach! Is binomial the right one? should I do sth else? and how to choose? If someone wants to play with the data, I am happy to send a link $\endgroup$ Nov 9, 2017 at 20:24

1 Answer 1


General linear models are so versatile (in fact a lot of linear models are just special cases of GLM) that I'd go for it.

" and the group (phylogeny) the insects belong to" Why don't you take a look at phylogenetic comparative methods so that you can explicitly take phylogeny into account instead of an arbitrary "group" variable? There are a lot of methods for studying quantitative variables given a phylogeny.

  • $\begingroup$ Hey gabalench thanks but that is not what my question is about. I am specifically interested in that transition, I dont want to widely explore their phylogeny, I just need to see the substrate contrasts across the different groups. $\endgroup$ Nov 10, 2017 at 8:28
  • $\begingroup$ Ok, then I would go for a GLM and posthoc comparisons with the R package multcomp. $\endgroup$
    – gaballench
    Nov 10, 2017 at 13:24

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.