[R] a warning message from lmer

Douglas Bates bates at stat.wisc.edu
Sat Jul 12 14:47:39 CEST 2008

On Sat, Jul 12, 2008 at 6:23 AM, Lan Wei <lanwei at umich.edu> wrote:
> Hi all,
> I have a problem when running lmer.
> In my data set, Agree is a binary(0/1) response. WalkerID and ObsID is
> the identification number of the subjects. the description of the
> other variables are as follows:
>> levels(regdat$Display)
> [1] "Dynamic" "Static"
>> levels(regdat$Survey)
> [1] "HM1_A" "HM1_B" "HM1_C" "HM2_A" "HM2_B" "HM2_C" "ST_A"  "ST_B"
> "ST_C"
>> levels(regdat$Emotion)
> [1] "aneu" "ang"  "con"  "joy"  "joy " "sad"
>> levels(regdat$ObsGender)
> [1] "F" "M"
>> levels(regdat$WalkerGender)
> [1] "F" "M"
> the watning is:
> fit1<-lmer(Agree~Display+Survey+Emotion+WalkerGender+ObsGender+(1|WalkerID)+(1|ObsID),family=binomial(link='logit'),data=regdat)
> Warning message:
> In mer_finalize(ans, verbose) : gr cannot be computed at initial par
> (65)

> Does anybody have some hint to solve this problem? I'd very much appreciate
> it!

In situations like this it is best to add the argument

verbose = TRUE

in the call to lmer so that you can see the progress of the
iterations.  (Also, you may want to call glmer directly.  When you
call lmer with a non-gaussian family it simply calls glmer.  You can
avoid the extra step.)

This call is returning a warning about evaluation of the gradient at
the initial values of the parameters.  I'm not sure if it then goes on
to optimize the approximated deviance.

If the approximated deviance is not being minimized for this model you
may want to start with a simpler model, omitting some of the terms in
the fixed effects.

More information about the R-help mailing list