An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20130916/2310fe30/attachment.pl>
Lack of Variation in Slopes
4 messages · AvianResearchDivision, Ben Bolker
AvianResearchDivision <segerfan83 at ...> writes:
Hi all, I have a very perplexing issue that I can't solve. I am running a model that resembles the following: model.lmer<-lmer(A~B*C+(B+0|Male)+(1|Male) A--continuous response variable B--continuous, grand mean centered predictor variable C--Factor with 11 levels Male--Factor with 33 levels When I check coef(model.lmer), the results under column B (i.e. slope) are the same across all 33 males. This does not make any sense to me. When I change the response variable to anything else other than A, I see variation in the slopes. This goes for my 2012 data set only. When I run my 2011 data using the same exact model from above, but referencing the 2011 data frame, I see variation in slopes. Finally, when I swap the data for C from 2011 to C for 2012, I also see variation in slopes. For whatever reason, I can't figure out what is going on with the 2012 data set. I have checked and rechecked my data in excel. I have also exported the data as a .txt file and reimported it back into excel and that hasn't fixed anything. There is absolutely no reason that I can think of for this to occur. Any ideas?
I strongly suspect that the problem is that the estimated random effects variation in the slope of A with respect to B across Males is zero. This happens with some regularity, especially for relatively small data sets, or complex models. You're estimating a lot of variation in B in the fixed effects (interaction with the 11-level factor C), so it doesn't shock me that under some circumstances you get a zero estimate for sigma^2_(B|Male). You can easily test this explanation by looking at the summary(), or VarCorr(), to see if that variance component is zero (or very small). Ben Bolker
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20130917/1878ee6b/attachment.pl>
AvianResearchDivision <segerfan83 at ...> writes:
[snip]
You were spot on with your suggestion. Thank you very much for your help. I had mentioned before that I probably should keep random slopes within my models since that is a primary interest of my study, regardless of whether a LRT suggests they are needed. Would you still recommend keeping them within the model? Jacob
I don't think it will hurt.