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,
p02.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee)+Treatment,  family=poisson,