[R-sig-ME] Another case of -1.0 correlation of random effects

Kevin E. Thorpe kevin.thorpe at utoronto.ca
Fri Apr 9 13:03:34 CEST 2010


Hello.

I know this has come up a couple times recently, but I'm still not sure 
what to do about it in my data.  Note that my sessionInfo() will be at 
the bottom.

My data come from a crossover trial and are balanced.

 > str(gluc)
'data.frame':	96 obs. of  4 variables:
  $ Subject  : int  1 2 3 5 6 7 10 11 12 13 ...
  $ Treatment: Factor w/ 2 levels "Barley","Oat": 1 1 1 1 1 1 1 1 1 1 ...
  $ Dose     : int  8 8 8 8 8 8 8 8 8 8 ...
  $ iAUC     : num  110 256 129 207 244 ...

 > xtabs(~Treatment+Dose,data=gluc)
          Dose
Treatment  0  2  4  8
    Barley 12 12 12 12
    Oat    12 12 12 12

I plot the data (attached as gluc.pdf, if it comes through).

 From the plot, I think I want to fit the model as:

lmer(iAUC~Treatment+Dose+(Treatment|Subject)+(Dose|Subject),data=gluc)

It could possibly be argued that the (Treatment|Subject) part is not 
needed.  When I fit this, I got -1.0 correlation within the Dose random 
effects.  To simplify, I will fit a simpler model, since the issue persists.

 > lmer(iAUC~Dose+(Dose|Subject),data=gluc,subset=Treatment=="Oat")
Linear mixed model fit by REML
Formula: iAUC ~ Dose + (Dose | Subject)
    Data: gluc
  Subset: Treatment == "Oat"
    AIC   BIC logLik deviance REMLdev
  562.6 573.9 -275.3    563.1   550.6
Random effects:
  Groups   Name        Variance Std.Dev. Corr
  Subject  (Intercept) 8274.324 90.9633
           Dose          16.214  4.0266  -1.000
  Residual             4862.319 69.7303
Number of obs: 48, groups: Subject, 12

Fixed effects:
             Estimate Std. Error t value
(Intercept)  309.352     30.539  10.130
Dose         -14.424      3.596  -4.012

Correlation of Fixed Effects:
      (Intr)
Dose -0.647

Now, a plot created by (and attached as lmlist.pdf):

plot(confint(lmList(iAUC~Dose|Subject,data=gluc,subset=Treatment=="Oat"),pooled=TRUE),order=1)

shows (I think) a strong negative correlation between the intercept and 
slope random effects for Dose.

So, I would appreciate some advice on how I might specify these random 
effects correctly.

One last thing I tried.  If I treat Dose as a factor (which might be 
reasonable) rather than numeric, I don't get any -1.0 correlations.

 > lmer(iAUC~dose+(dose|Subject),data=gluc,subset=Treatment=="Oat")
Linear mixed model fit by REML
Formula: iAUC ~ dose + (dose | Subject)
    Data: gluc
  Subset: Treatment == "Oat"
    AIC   BIC logLik deviance REMLdev
  545.2 573.3 -257.6      547   515.2
Random effects:
  Groups   Name        Variance Std.Dev. Corr
  Subject  (Intercept)  7509.9   86.660
           dose2       11993.0  109.513  -0.321
           dose4        6399.5   79.997   0.043  0.873
           dose8        6051.7   77.793  -0.743  0.433  0.306
  Residual              1206.4   34.733
Number of obs: 48, groups: Subject, 12

Fixed effects:
             Estimate Std. Error t value
(Intercept)  293.567     26.951  10.893
dose2          6.692     34.648   0.193
dose4        -39.975     27.099  -1.475
dose8       -105.517     26.558  -3.973

Correlation of Fixed Effects:
       (Intr) dose2  dose4
dose2 -0.380
dose4 -0.103  0.786
dose8 -0.724  0.443  0.360

Thanks in advance and here is my sessionInfo().

 > sessionInfo()
R version 2.10.1 Patched (2009-12-29 r50852)
i686-pc-linux-gnu

locale:
  [1] LC_CTYPE=en_US       LC_NUMERIC=C         LC_TIME=en_US
  [4] LC_COLLATE=C         LC_MONETARY=C        LC_MESSAGES=en_US
  [7] LC_PAPER=en_US       LC_NAME=C            LC_ADDRESS=C
[10] LC_TELEPHONE=C       LC_MEASUREMENT=en_US LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] lme4_0.999375-32   Matrix_0.999375-33 lattice_0.17-26

loaded via a namespace (and not attached):
[1] grid_2.10.1


-- 
Kevin E. Thorpe
Biostatistician/Trialist, Knowledge Translation Program
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: kevin.thorpe at utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gluc.pdf
Type: application/pdf
Size: 49449 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20100409/a55f7d89/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lmlist.pdf
Type: application/pdf
Size: 9444 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20100409/a55f7d89/attachment-0001.pdf>


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