# How to compare multiple proportions between multiple groups

I measured prey capturing success (=proportion of successful captures divided by the total number of prey captured) in four fish species (species 1: n=19, species 2: n=18, species 3: n=4, species 4: n=3) and would like to compare the prey capturing success between the four species. However, as there might be an individual effect within species (some fish might be better due to slight differences in morphology) I do not think one can simple sum everything up and compare four values (proportions). Therefore I want to know if it is possible to compare multiple proportions between the four species. Note that the proportions do not show a normal distribution within the species.

-
so you're taking proportions because they're all going for the same prey? – conjugateprior Feb 5 '14 at 10:29
Each individual was presented with a number of prey, I calculated how many of those were captured at first attempt (strike) = prey capturing success – Chris Feb 5 '14 at 11:15
so it's not a prey-captured/total-prey-captured, it's prey-captured/prey-offered. That's different, and easier. I'd go with @PeterFlom option 1 if I were you. – conjugateprior Feb 5 '14 at 12:18

As I understand it, you have multiple individual fish within each species.

Each individual caught a certain proportion of prey.

You want to model the success rate as a function of species, accounting for the fact that there were multiple individuals in each species, and each individual varied in ability.

If so, there are, I think, three main approaches:

1) A nonlinear multilevel model, with species at one level and individual fish at another.

2) GEE (generalized estimating equations).

3) Accounting for the clustering with a sandwich estimator.

My own experience is mostly with 1) which replace the usual logistic regression equation:

$\mathrm{logit}(Y) = BX$

with

$\mathrm{logit}(Y) = BX + u_{ij}$

where $u_{ij}$ is the effect at level 2

The difference between (1) and (2) is that (1) is a conditional model and (2) is a marginal model. (3) is an attempt to deal with the clustering by making the variance estimation robust.

More resources:

Multilevel modeling for binary data on (1) GEE analysis of clustered binary data on (2) (looks good from the abstract, I haven't read it) This thread here on SE about the difference

I did see a paper on (3) at a Northeast SAS Users Group; Google finds it, but the link seems to have deteriorated (or it might be my internet connection that has).

-
+1 In R option 1 would be a straightforward application of glmer in the lme4 package. – conjugateprior Feb 5 '14 at 12:22
@conjugateprior Yes. All 3 options can be modeled in R or SAS (and probably other software). But the post doesn't mention software and my answer was already pretty long. – Peter Flom Feb 5 '14 at 12:36
It wasn't intended as a criticism. Though probably it should have been under the original question rather than your answer. – conjugateprior Feb 5 '14 at 14:16
Thanks for the reply and literature, I will go definitely go through it. Regarding the actual data analysis: if I use R, should I go for the glmer or nlmer function (as it is a nonlinear model)? – Chris Feb 6 '14 at 10:07
I am not expert on Rs functions for this. I think both can do it. – Peter Flom Feb 6 '14 at 10:29

You can test this with ANOVA after angle-transforming data Sin(sqrt(x)). However, there might be too few cases in species 2 and 3.

-