[R-sig-ME] Tackling various errors in a mixed-effects Poisson model
lofgrene at vbi.vt.edu
Wed Jan 14 21:12:44 CET 2015
(Some of this content cross-posted to either StackExchange or CrossValidated)
I’m currently working on an interrupted time-series project, and have run into some implementation issues I was hoping folks might be able to help me through. The data I’m working with has about ~1200 observations, with the observations split evenly between 17 sites for a total of 72 observations/site.
At the moment, I’m trying to estimate a single rate as a response to an indicator variable indicating a change in policy, the time up until the policy, the time after the policy, a binary cofounder and a continuous confounder.
If I was just doing a single site, the model would look something like:
mod <- glm(Outcome ~ Exposure + t_before + t_after + Var1 + Var2 + offset((log(PersonTime)), family=Poisson, data=data)
Since we’ve got multiple sites, I’ve moved to a mixed-effects model that looks like so:
mod <- glmer(Outcome ~ Exposure + t_before + t_after + Var1 + Var2 + (t_before + t_after + Var1 + Var2|Site) + offset((log(PersonTime)), family=Poisson, data=data)
I’ve also added control=glmerControl(optimizer="bobyqa",optCtrl = list(maxfun = 500000)) because of some convergence issues in a test model. This brings me to the two major issues I’m having:
1. In some of the models, lme4 is generating this error "Error: (maxstephalfit) PIRLS step-halvings failed to reduce deviance in pwrssUpdate” in the presence of some, but not all offsets. I can’t see a clear difference between the offsets that are triggering this and the offset that isn’t (save that the triggering offsets are smaller, but they’re both reasonably normal when log transformed).
2. Generally, these models are having some serious convergence issues with lme4. I’m reluctant to simplify the models much further, but does anyone have suggestions in that regard? Would an MCMC based approach work better (if more computationally intensively) for this kind of data? If so, how would you compose the model above in something like MCMCglmm?
Thanks very much for your help,
More information about the R-sig-mixed-models