[R-sig-ME] Including random effects creates structure in the residuals

Peter Claussen dakotajudo at mac.com
Tue Feb 27 15:40:27 CET 2018


PIerre,

I’m going to disagree that the residuals from the without id effect do not suffer from a bad fit.

There appear to be a series of bands in https://ibb.co/fFVDNc <https://ibb.co/fFVDNc> , on the left half of the graph. If you were to change the scale (say, focusing on the region at about 59, you might see these bands have a bias as well. My suspicion is that the location of each band represents the location of individual intercept, (1|id). 

You might remove the bias by including an individual random slope, i.e (age | id). The data might also be autocorrelated.

Cheers,
Peter


> On Feb 27, 2018, at 2:53 AM, Pierre de Villemereuil <pierre.de.villemereuil at mailoo.org> wrote:
> 
> Dear all,
> 
> I have an issue that I can't get my head around. I am working on a human cohort dataset studying heart rate. We have repeated measures at several time points and a model with different slopes according to binned age categories (the variable called "broken" hereafter, for "broken lines").
> 
> My issue is that when I include an individual ID effect (to account for the repeated measures), I obtain structured residuals while this is not the case for a model without this effect.
> 
> Here are my models:
> mod_withID <- lmer(cardfreq ~ sex + 
> 								broken + 
> 								age:broken + 
> 								betabloq + 
> 								cafethe + 
> 								tabac + 
> 								alcool +
> 								(1|visite) +
> 								(1|id),
> 				   data = sub)
> mod_noID <- lmer(cardfreq ~ sex + 
> 								broken + 
> 								age:broken + 
> 								betabloq + 
> 								cafethe + 
> 								tabac + 
> 								alcool +
> 								(1|visite),
> 				  data = sub)
> 
> The AIC (computed with a fit with REML = FALSE) clearly favours the model including the ID effect:
> AIC(mod_withID)
> 75184.51
> AIC(mod_noID)
> 76942.09
> 
> Yet, the model including the ID effect suffers from a bad fit from the residuals point of view (structured residuals) as the plots below show:
> - The residuals with the ID effect:
> https://ibb.co/b6WsFx
> - The residuals without the ID effect:
> https://ibb.co/fFVDNc
> 
> From this, I gather that the fixed effect part is good enough to provide a good fit, but there is a covariance from the residuals and the BLUPs from the ID effect (I've checked this). Especially, if we marginalise on the random effects to compute the residuals, then everything is fine, suggesting the issue lies in the random rather than the fixed part.
> 
> I'm a bit puzzled by this. Why would adding an individual effect would create such a structure in the residual part? Why does this covariance between the individual BLUPs and the residual arise?
> 
> I'd happily take anyone's input on this as I'm at a loss regarding what to do to solve this.
> 
> Cheers,
> Pierre
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


	[[alternative HTML version deleted]]



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