1

I'm trying to compare proportions of male (M) beetles from two groups - one 'general' site with high rainfall (R) and one 'general' site without it (A).

I'm using museum records, so the span across countries. So, I could lump groups over the whole country (e.g. specimens in Sydney are grouped with specimens from Michigan) but that seems incorrect because they don't share other similar features.

Thus, there are 'specific' groups (subgroups) - R1 (all high rainfall from sydney) with a proportion of 0.2; R2 (all high rainfall from Melbourne) with a proportion of 0.3 etc. Such that the data looks like:

Site ; M ; n

R1 ; 0.2 ; 10

R2 ; 0.3 ; 12

R3 ; 0.5 ; 7

A1 ; 0 ; 8

A2 ; 0.3 ; 20

A3 ; 0.7 ; 12

I hope that makes sense!

I guess my question is - is there a way to now group these proportions, taking account the number of individuals in each group (n) and compare A with R.

I've looked at doing a glm (see code below)- but I have issues with the multiple subgroups - and I can't seem to wrap my head around what to do/how to get around binomial.

glm(PM~Site, data=Data, family=binomial, weights=n)

fernace
  • 11
  • 1
  • 1
    I suspect you need to model RainfallversusArid as a binary predictor rather than Site. If that is not the issue you need to edit some more explanation into your question. – mdewey Feb 27 '17 at 17:03
  • How many groups are there? You could binomial logistic regression (with correction for overdispersion). If the goal is to cluster similar groups, you could try a fused lasso, maybe see http://stats.stackexchange.com/questions/146907/principled-way-of-collapsing-categorical-variables-with-many-categories for some ideas. – kjetil b halvorsen Feb 27 '17 at 17:03
  • 1
    Have you considered a simple crude proportions test? Just multiply M by n, add up numbers of males/ females from each site and do a proportion test for total males vs. total females in sites with rain vs. sites with no rain? – AdamO Feb 27 '17 at 17:19
  • @mdewey - yes I think that might be the way to go..in fact I think you're exactly right. Thank you! I just had spent so much time looking at it that I overlooked the obvious solution. – fernace Feb 28 '17 at 10:04
  • @kjetilbhalvorsen - thank you! I'll have a look into that. There are about 15 groups. – fernace Feb 28 '17 at 10:04
  • @AdamO - a crude proportions test lumps groups that are dissimilar in other ways, and I think I want to avoid that. – fernace Feb 28 '17 at 10:04
  • @fernace now we're getting salient details. What about a stratified Mantel Haenszel or a logistic regression with *fixed* effects? – AdamO Feb 28 '17 at 17:24

0 Answers0