[R-sig-ME] testing for a significant correlation between random slopes

Bill Shipley bill.shipley at usherbrooke.ca
Thu Dec 18 18:37:22 CET 2014

Hello.  I am fitting a 2-level mixed model using the lme() function
involving two independent variables (“t” and “starchR”) in which the
intercept, both slopes and the interaction of the two slopes is also random:


fit.rgr2<- lme(log(TotalDM)~t+starchR +


The model converges normally without any warning messages.  All of the fixed
terms are clearly different from zero. Mmy working hypothesis requires that
there also be a negative between–group correlation between the slope of “t”
and the interaction term (i.e. groups whose slope for “t” is high at low
values of “starchR” have this slope decrease more rapidly as “starchR”
increases).  When I fit the above mixed model using the lme() function, I
indeed find a strong negative correlation of -0.867; here is the relevant
part of the output from summary:


StdDev Corr 

(Intercept) 1.650783941 (Intr) t 

t 0.055870605 -0.124 

t:starchR 0.000309582 -0.340 -0.867 

Residual 0.337147863


However, there are only 20 groups and I know that large absolute
correlations between parameters can arise if the model is overparameterized.


Question: how can I determine if the value of -0.867 is really different
from zero?


Intuitively, I would fit another model in which the covariance between the
random components of “t” and “t:starchR” is constrained to be zero and then
compare the two models via their likelihoods, but I don’t know how to fit
such a constrained model in either lme() or lmer(). 

Any help or pointers to relevant literature would be appreciated.



Bill Shipley

Laboratoire d’Écologie Fonctionnelle

Département de biologie, Université de Sherbrooke, Sherbrooke (Qc) Canada
J1K 2R1

(819) 821-8000, poste 62079

Fax: (819) 821-8049



	[[alternative HTML version deleted]]

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