[R-sig-ME] Specification of binomial mixed model with custom intercept

Tom Wenseleers Tom.Wenseleers at bio.kuleuven.be
Tue Jun 23 17:02:47 CEST 2015


Dear all,
I have a binomial mixed model
fit=glmer(cbind(infected,not_infected)~(1|colony)+treatment*time,family=binomial,data=data)
in which I am modelling the evolution of an infection in different social insect colonies across two treatment groups (INJECTED and CONTROL) as a function of time. 
However, as my INJECTED group individuals should all be infected at time=0, whereas none of my CONTROL individuals should be infected at time=0, I would like to force the model to go approx through 1 at time t=0 for the INJECTED group and to go approx through 0 at time t=1 for the CONTROL group. What would be the correct way to specify such a model?
I tried with
data$baseline=qlogis(c(0.001,0.999))[data$treatment]
fit=glmer(cbind(infected,not_infected)~(1|colony)+treatment*time+offset(baseline),family=binomial,data=data)
but this doesn't seem to give sensible predictions.
Any thoughts on the correct syntax?

cheers,
Tom Wenseleers




More information about the R-sig-mixed-models mailing list