[R-sig-ME] Very small random effect estimation in lmer but not in stata xtmixed
Ben Bolker
bbolker at gmail.com
Fri May 4 15:54:00 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12-05-04 09:46 AM, Joerg Luedicke wrote:
> Ben,
>
> OP initially posted his problem over at the R-help forum:
>
> https://stat.ethz.ch/pipermail/r-help/2012-May/311685.html
>
> and so there was some discussion already.
>
> Mohammed sent me his data off-list and there does not seem to be a
> problem with his data, as far as I can see. The problem rather
> seems to be that lmer has some difficulties with estimating the
> variance parameter for varying intercepts when the sample size is
> small and the lower level variance is high relative to the group
> level variance. Please see my following post from the R-help
> forum:
>
> https://stat.ethz.ch/pipermail/r-help/2012-May/311766.html
>
> Any thoughts on this?
>
> Joerg
>
I would love to see the data and/or the comparison with (1) nlme and
(2) the development version of lme4, to know if the problem is
fixed/fixable. My (not very informed at this point) guess is that it
is basically a nonlinear optimization problem. I would like to see
the plot of REML vs. estimated RE variance -- my guess is that it has
two maxima ...
(Thomas Lumley's answer on r-help looks wrong to me: I think he was
reading the model output too quickly and confused the correlation
among fixed effects with an among-RE correlation.)
Ben Bolker
> On Fri, May 4, 2012 at 5:39 AM, Ben Bolker <bbolker at gmail.com>
> wrote:
>> Mohammed Mohammed <M.A.MOHAMMED at ...> writes:
>>
>>
>>> I am using the lmer function (in the lme4 library) to analyse
>>> some data where individuals are clustered into sets (using the
>>> SetID variable) with a single fixed effect (cc - 0 or 1). The
>>> lmer model and output is shown below.
>>
>>
>>
>>> Whilst the fixed effects are consistent with stata (using
>>> xtmixed, see below), the std dev of the random effect for SetID
>>> is very very small (3.5803e-05)compared to stata's (see below
>>> 1.002). Any ideas why this should be happening please....?
>>
>>> I am happy to share my data if that helps.
>>>
>>
>> Nothing really obvious pops out. Have you tried nlme (i.e
>> library(nlme); lme(AnxietyScore ~cc, random=~1|SetID,data=mydf))
>> as a cross-check?
>>
>> Can you send/post data?
>>
>> Ben Bolker
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPo994AAoJED2whTVMEyK9s1UH/R/YZS5XMpt0a1M6b7NWIpL1
rz1yV6gR1xauHxJZkD46v++R5DUsJ7z1RSBYEhTvfVj/wVPoP/L/a7TIOD4ffQHJ
+8gae/jJngrPt7zsM+2YdgST1aRiAHRKgjXcys6hhz27QaTxNGrLqxhICV6P/OsU
6WH3MqCxsevcaU7hWRi83mUGX0zyyQ4OAgATh+EK5zP5dzWLISQt9uvUk8B7/AL1
2H52IL8f0TTcLce309aH2nR/C9HPGolHusIYOZrIvgWze/Rwx9UkDxeUBaXoB9eK
b30tdTFPOTIBZfsBr7+zc+HDKmuQrQMpLwiE5ovZOnazPb5Vk57UY6GUmw1e6WQ=
=aWBF
-----END PGP SIGNATURE-----
More information about the R-sig-mixed-models
mailing list