[R-sig-ME] [R] lme4 Error Help: “maxstephalfit…pwrssUpdate”

Ben Bolker bbolker at gmail.com
Mon Apr 28 17:11:22 CEST 2014


On 14-04-28 07:57 AM, Craig O'Connell wrote:

> Thanks.  I used the most current version of lme4 that is why I was a
  bit concerned.  My data seems appropriate and with lme4 working last
  week on a very similar data set, I was left a bit confused.  Since I
  only starting implementing this technique, does anybody have some
  pointers on what I should look for that may potentially cause some
  issues?


Does the new as well as the old version of lme4 work on the very
similar data set you analyzed last week?

If you think the problem is with a broken version of lme4 you could
try installing lme4.0 (from http://lme4.r-forge.r-project.org/repos)
and see if it makes a difference.

I would look for extreme observations/groups in the data sets
(e.g. cases with all-zero avoidances; if the overall mean is positive
you may need an infinite parameter value for this case).  If you
can come up with a reproducible example, there's a chance we can
set some bounds within the internal code to allow this to fit ...

If you set some of the groups to all-zero avoidance in the data
set that previously worked can you get it to stop working?

  PS -- I don't know how your data are structured, but if you have
a small number of visits and the number of avoidances is _not_
necessarily a small fraction of the number of visits, you may
want to consider a binomial rather than a Poisson model ...


>> -----Oorspronkelijk bericht-----
>> Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Namens Craig O'Connell
>> Verzonden: maandag 28 april 2014 3:20
>> Aan: r-help at r-project.org
>> Onderwerp: [R] lme4 Error Help: “maxstephalfit…pwrssUpdate”

>> I am using a mixed model to assess the effects of various variables
   (i.e. treatment, density, visibility) on bee behavior (e.g.,
   avoidance frequency - total avoidances per total visits; feeding
   frequency, and mating frequency).  Bee individuals is my random
   factor (n=63 different bees), whereas treatment type, animal
   density, and air visibility are my fixed factors.

>> However, when I run my models, I immediately get an error that I
   cannot fix.  Here is a sample of my data:

>> Bee   Treatment    Visits    Avoid   Feeding    Mating    Density   Visibility
>>
>> 1   C   5   0   5   0      5        4
>> 2   C   4   0   3   0      5        4
>> 3   C   3   0   3   0      5        4
>> ...
>> 63
>>
>> 1   PC  2   0   1   1      5        4
>> 2   PC  3   0   0   3      5        4
>> 3   PC  1   0   0   0      5        4
>> ...
>> 63
>>
>> 1   M   5   0   1   3      5        4
>> 2   M   3   2   0   0      5        4
>> 3   M   2   0   0   2      5        4

>> 63One I create my .txt file, I being my coding in R by first loading lme4.  After that, my coding starts off as follows:
>> barrierdat = read.table("GLMMROW.txt", header=TRUE) barrierdat barrierdat$Visibility = as.factor(barrierdat$Visibility);
barrierdat$Density    = as.factor(barrierdat$Density)
p01.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee), family=poisson,
                  data=egghead);  # null model


   Note that you can often use update() to simplify your code, e.g.

p02.glmer = update(p01.glmer,.~.+Treatment)
p03.glmer = update(p01.glmer,.~.+Visibility)
p04.glmer = update(p01.glmer,.~.+Density)



More information about the R-sig-mixed-models mailing list