[R-sig-ME] Very small random effect estimation in lmer but not in stata xtmixed
Joerg Luedicke
joerg.luedicke at gmail.com
Fri May 4 15:46:11 CEST 2012
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
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
More information about the R-sig-mixed-models
mailing list