[R] sorting out partially nested mixed effects in lme4
W.B. Kloke
wb at arb-phys.uni-dortmund.de
Wed Mar 4 14:29:55 CET 2009
In lme4 I wamnt to analyse a dataset in which the random effects are
somewhat intricate. The nearest approximation of what I want to know is
lmer(hr~hpos+((bin=="b")|VP)+(1|(VP:exp)), data)
In this design VP denotes the subject variable, and exp the experimental
unit (which is obviously nested in VP). The comparison is true in 2/3 of cases.
The most interesting outcome are the sd and the BLUPs for this factor
with treatment contrast.
The problem with this, that the uninteresting intercept term from
the first random factor is doubled,
because the term 1|(VP:exp) of the second rndom term already estimates
individual intercepts for each experimental unit.
What is worrying me is that it happens sometimes the lmer summary may look as
Formula: hl ~ hpos * vpos + ((bin == "b") | VP) + (1 | (VP:exp))
Data: subset(mean2, bin != "r")
AIC BIC logLik deviance REMLdev
42959 43014 -21471 42959 42941
Random effects:
Groups Name Variance Std.Dev. Corr
(VP:exp) (Intercept) 6.56e+06 2.56e+03
VP (Intercept) 2.54e-08 1.59e-04
bin == "b"1 8.30e+01 9.11e+00 0.000
Residual 5.43e+04 2.33e+02
Number of obs: 3077, groups: (VP:exp), 81; VP, 17
or sometimes as
Formula: hr ~ hpos * vpos + ((bin == "b") | VP) + (1 | (VP:exp))
Data: subset(mean2, bin != "l")
AIC BIC logLik deviance REMLdev
40009 40063 -19995 40010 39991
Random effects:
Groups Name Variance Std.Dev. Corr
(VP:exp) (Intercept) 1.30e+06 1141.39
VP (Intercept) 7.61e+06 2758.21
bin == "b"1 8.07e+01 8.99 -0.779
Residual 4.35e+04 208.47
Number of obs: 2914, groups: (VP:exp), 81; VP, 17
In the first case the 2nd intercept is estimated as nearly zero, in the
other of substantial size, but the data themselves should be quite similar,
because they are measured in the same experiments, one on the right eye,
the other on the left. I did not find a way the eliminate the estimation
this term.
--
Dipl.-Math. Wilhelm Bernhard Kloke
Leibniz-Institut fuer Arbeitsforschung an der TU Dortmund
Ardeystrasse 67, D-44139 Dortmund, Tel. 0231-1084-373
PGP: http://vestein.arb-phys.uni-dortmund.de/~wb/mypublic.key
More information about the R-help
mailing list