[R-sig-ME] [R] negative variances
Douglas Bates
bates at stat.wisc.edu
Wed Apr 11 16:15:21 CEST 2007
On 4/11/07, Tu Yu-Kang <yukangtu at hotmail.com> wrote:
> Dear R experts,
>
> I had a question which may not be directly relevant to R but I will be
> grateful if you can give me some advices.
>
> I ran a two-level multilevel model for data with repeated measurements over
> time, i.e. level-1 the repeated measures and level-2 subjects. I could not
> get convergence using lme(), so I tried MLwiN, which eventually showed the
> level-2 variances (random effects for the intercept and slope) were
> negative values. I know this is known as Heywood cases in the structural
> equation modeling literature, but the only discussion on this problem in
> the literature of multilevel models and random effects models I can find is
> in the book by Prescott and Brown.
>
> Any suggestion on how to solve this problem will be highly appreciated.
It is possible that the ML or REML estimates for a variance component
can be zero. The algorithm used in lme doesn't perform well in this
situation which is one reason that the lmer and lmer2 functions in the
lme4 package were created. Could you try fitting the model with those
or provide us with the data so we can check it out?
I recommend moving this discussion to the R-SIG-mixed-models mailing
list which I am copying on this reply.
More information about the R-sig-mixed-models
mailing list