# GLM of proportions with offset

I am fitting a glm with a binomial family to consider the relationship between the proportion of trials in which courtship of a female type $A$ occurs (successes) and male genotype (a two level factor).

model  <- glm(cbind(successes, failures) ~ genotype, family = binomial)


The experiment actually includes two types of female ($A$ and $B$) and I want to account for the amount of courtship activity (i.e. courtships of female types $A$ OR $B$) as this will obviously influence the proportion of trials in which courtship of $A$ occurs. For clarification, during each trial, a male can court no female, female type A, female type B, or both. I was wondering if the correct way to do this was using an offset, i.e.:

model  <- glm(cbind(success, failure) ~ genotype + offset(num_trials_with_act), family = binomial)


or perhaps:

model  <- glm(cbind(success, failure) ~ genotype + offset(log(num_trials_with_act)), family = binomial)


Would this be correct? Or would it be better just to include the proportion of trails with activity as a further explanatory variable:

model  <- glm(cbind(success, failure) ~ genotype + prop_trials_with_act, family = binomial)


I could model the trails with courtship towards $A$ as a proportion of only trials with courtship towards $A$ or $B$, but I feel I will lose information.

• Would it not be simpler to include a factor which distinguishes between type A and type B females? If I have completely misunderstood your question perhaps you could edit it to clarify? – mdewey Nov 18 '16 at 11:49