I have data on sex and age of a population in different periods of the year, for several years. I want to test if age and sex ratios are the same across different moments of a year. I think a log linear model would be appropiate, beginning with something like (in R)
glm(counts~year * period * sex * age, data=databirds,family='poisson')
I would test the different interactions until I could select a model.
My doubt is about independence of my data. All the samples are extracted from the same population. I assume that there are migration and mortality processes, and a reproductive season, so the population is not exactly the same across the year, but some individuals were catched more than once in different periods (and in ifferent years). That is, I have determined the sex once for some individuals and more than once for others (there are birds, so the sex of an individual is always the same).
Should I add a random factor? Something like
glmer(counts~year * period * sex * age+(1|bird), data=databirds,family='poisson')
If so, the interpretation of fixed effects is the same as log-linear models, that is, should I look to interactions?
If there are some difference, should I contrast effects or interactions?
Finally, as I will fit several models, should I correct the significance level? I thought this was made for contrasts, but recently I read something about correcting significance level for nested models (as models including 2-way interactions, that are evaluated after selecting a 3-way interaction).
Thanks in advance!
Edit: Well, now I think it would be better to use a repeated measures glm, with a binomial distribution, something like
glmer(ratio~period+age+(1|year),family=binomial)
I think this should solve the independence problem...Is this correct?