# Binomial glm help!

I have been given a dataset with 750 participants, with information on Age, Location, Gender and the year it was obtained (predictor variables although responses may vary by location so this is a random effect).

For each individual, a number of 0/1 responses were recorded based on items they had purchased in the last 5 years.

I am aiming to assess whether purchases vary by year, gender and age.

My question is: would this be a binomial glmer and how would i go about coding the 0/1 part? And if so, would i have to test each item individually?

Some example items are car, television, and more location specific items such as pool cleaner.

Thanks.

• As described, this is just a logistic regression problem. No need for random effects. – Eoin Jul 2 '20 at 11:07
• @Eoin there is clustering by location, so radom intercepts would be a good way to handle that. – Robert Long Jul 2 '20 at 13:56

There is clustering of observations within location, so one approach to this problem is to fit a seperate generalised linear mixed effects model for each item, with random intercepts for location. In particular you could use a logistic model. If using glmer you would specify family = binomial(link = logit).
Perhaps a better aprroach would be to combine each participant's purchases by summing over the invividual items, to produce a count variable. You could then run a single glmm model which would be a poisson model using family = poisson(link = log). This would have the advantage of using all the data in a single model so it would have more statistical power, the downside is that it would not provide any inference regarding individual items. You would need to check for zero inflation and over/under dispersion which would indicate a more complex model if present.