GLM with proportion data and two categorical predictor variables

I want to analyze data on mortality (as number of dead individuals in the total number of individuals) in function of treatment (two levels) and location (four levels). I’m also interested in the interaction of treatment * location, since from the boxplot it seems clear to me that there might be an interaction between treatment and location (i.e. difference between treatments in individuals from location V, but no difference between treatments in individuals from the other locations). In fact, when I try an ANOVA (although I know that it would not correspond with proportion data) I find this interaction to be significant.

I did a GLM with binomial distribution, but there are only two main effects and no interaction.

> M1 <- glm(prop ~ location * treatment, family = binomial, weights = total, data = data)
> Anova(M1)

Analysis of Deviance Table (Type II tests)
Response: prop
 LR Chisq Df Pr(>Chisq)
location 97.398 3 < 2.2e-16 ***
treatment 20.636 1 5.554e-06 ***
location:treatment 2.778 3 0.4272

So the main message of this outcome would be that there is a higher mortality in treatment F in individuals from any location, what makes me doubt, based on the pattern I see in the plot. Since I’m not very familiar with GLM analysis, I wonder whether I’m doing it right or do I miss something out? I would appreciate any comment or suggestion! Further information: The number of replicates was 5. The overdispersion factor is 1.3

• How's the prop variable defined? Jul 13, 2022 at 21:37
• prop would be the proportion of dead individuals in the total of individuals, so prop=dead/(dead+alive) Jul 14, 2022 at 16:11
• I'm not sure what you are actually plotting; isn't there just one prop per location and treatment? If these are observed proportions, then these are hard to take at face value as well. While I can believe there are differences by treatment and location, seeing 0 dead in two locations and 0.75 in another would make me doubt the data and so any model derived from it. Jul 16, 2022 at 14:50

I wonder whether I’m doing it right or do I miss something out?

You seem to be doing this right, in particular including the number of observations for each proportion in the weights argument. What you're missing out is that the logistic binomial regression doesn't work in the proportion scale with prop but rather in the log-odds (logit) scale, $$\ln(\text{prop}/(1-\text{prop}))$$. That makes a big difference with your data. You could try re-plotting your data in the log-odds scale to see.

For example, say that the prop proportion values for location V are 0.75 and 0.25 for treatments F and P, respectively. The difference on the proportion scale is 0.5. Those have corresponding logits of about +1.1 and -1.1, for a difference of 2.2 on the logit scale.

Now say that prop for treatment F at location P is 0.1, for a logit of about -2.2, and treatment P at location P has a prop of 0.012 with a logit of about -4.4. That's a difference of less than 0.09 on the proportion scale, much less than the difference on that scale at location V, but the same treatment difference on the logit scale as for location V.

• Dear @EdM, thank you very much for the clarification! But that raises another question. To take your example, I’m really interested in testing whether the difference between treatments P and F for individuals from location V is bigger than for individuals from location P at the real (prop) scale. From your answer I conclude that using the binomial GLM, this relation would be somewhat distorted in the analysis, so I doubt whether the binomial GLM would be the appropriate test in this case. Perhaps some kind of non-parametric test would be a better option? Jul 15, 2022 at 14:02
• @Ricarda it depends on the scale for measuring the "difference between treatments." Log-odds is a standard choice, as it doesn't face the problem of fixed probability limits at 0 and 1. If in location V you have probabilities of 0.75 and 0.25 for treatments F and P (difference 0.5 in probability scale), then any location with a probability less than 0.5 under treatment F (all other locations in your case) would be unable to show a treatment difference that large on the probability scale--because probability can't be less than 0. One could argue that the probability scale is thus distorted.
– EdM
Jul 15, 2022 at 18:59
• @Ricarda I think that readers/reviewers in most fields of study would expect results from binomial regression (e.g., log-odds scale) instead of in the linear probability scale. For example, discrete-time survival models, a simple extension of your study to multiple times, are sets of binomial regressions. In the linear probability scale, the fixed lower limit of 0 probability poses a big interpretation problem even if you could find some non-parametric test to show that treatment effects "differ" among locations in that scale.
– EdM
Jul 15, 2022 at 19:34