0

I am trying to run a repeated measures glmm with a fixed intercept at 0 for a longitudinal study calculating the spread of a parasite within different genotypes of Daphnia hosts, and testing for a gxg effect between parasite strain and host strain. What I am curious about is how having a fixed intercept would interact with my random effect terms.

What I have now for my model is:

y <- cbind(infected, uninfected)
glmer(y ~ Days*Genotype-1+(Day|Population), family=binomial, data)

Where Days represent the days I sampled and checked for infected/uninfected, Genotype are my strains of Daphnia and Population are the populations of Daphnia I have in the experiment. I am aware that there is some contention about having a fixed intercept, but I am using it as all populations must have started with no infection. Would this model be appropriate for answering my main question?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
reisen
  • 1
  • 1
  • Shouldn't you have Days listed in the random effect portion of your model instead of Time? Also, is Days a numeric variable or a factor in your model? – Isabella Ghement Dec 25 '18 at 22:32
  • Yes Day should have been Time instead (edited in original post now), I mixed some variables up. Days is a continuous variable, not a factor. – reisen Dec 26 '18 at 05:29
  • Does this help https://stats.stackexchange.com/q/7948/35989 ? – Tim Dec 26 '18 at 06:51
  • @Tim It helps in part, but I am mostly interested in how having a fixed intercept would interact with random effect terms or if it is possible to have a valid model with both fixed intercept and random effects. In this particular case, there is physical rationale for the model to begin at 0, so I would still argue using a fixed intercept would be reasonable. – reisen Dec 27 '18 at 02:41
  • 1
    At a minimum, it's always a good idea to fit a model with an intercept just to see whether it's significant and/or its estimate is large. There can be many reasons why data are more consistent with a nonzero intercept than with a zero intercept even when you're absolutely sure the response at zero should be zero. – whuber Dec 27 '18 at 18:54
  • Hmm...What is your response? Is it "whether or not you noticed an infection on a particular day"? In that case, you are modelling log odds of infection for a typical population as a function of day and genotype. If you coded your first day as Days = 0, then the fixed intercept represents the log odds of infection on day 0 for the 'reference' genotype. So setting this intercept to 0 means that the probability of infection on day 0 for the 'reference' genotype is 0.5. That is, infection and no infection are equally likely on that day for the 'reference' genotype for the typical population. – Isabella Ghement Dec 27 '18 at 19:19
  • @whuber: Could you look at my comment above? I agree with you that the intercept should be included in the model and tried to outline why setting it to zero would not make sense from a model interpretation point of view. Can you let me know if my argument makes sense to you? The argument is built around the fact that exp(0)/(1 + exp(0)) = 0.5. Thanks very much and Happy Holidays! – Isabella Ghement Dec 27 '18 at 19:24
  • 1
    @Isabella I think you're right--I wasn't paying attention to the fact this is a binomial family with a logit link. – whuber Dec 27 '18 at 19:57
  • Thanks, @whuber! I didn't pay attention to that either initially because of how the question was formulated, but then I realized the interpretation offered in the question would have made sense for a Gaussian family with identity link, not for a binomial family with a logit link. – Isabella Ghement Dec 27 '18 at 20:39
  • @IsabellaGhement I coded my response variable to be a binary between infected or not infected out of a sample of 100 that I take from each of my populations. I am trying to see how quickly the parasites infect each of the populations based on genotype through time, and I do this by sampling every couple of days from Day=0 as you guessed. Apologies for the poor question setup; I am fairly new to this. – reisen Dec 28 '18 at 03:19

0 Answers0