[R-sig-ME] Lack of Variation in Slopes

Ben Bolker bbolker at gmail.com
Mon Sep 16 23:14:10 CEST 2013


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



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