1
$\begingroup$

I am using a mixed model to assess the effects of various treatments 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   P   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
...
63

One 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;
p02.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee)+Treatment,  family=poisson, 
                  data=egghead);
p03.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee)+Visibility, family=poisson, 
                  data=egghead);
p04.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee)+Density,    family=poisson, 
                  data=egghead);

However, upon immediately running my models (e.g. p01.glmer), I receive the error:

Error: (maxstephalfit) PIRLS step-halvings failed to reduce deviance in pwrssUpdate

Does anybody know what the issue is? I ran nearly identical data several weeks ago and had no issues. Any Suggestions on how to proceed?

I would be more than happy to send you the whole dataset and code should you find it necessary.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.