I have a dataframe with three columns “site” (20 different sites), “year” (three years) and “animal” (sighting: 1, no sighting: 0). All three variables are factors. A simplified version of the data looks like this:
> head(data_animal) site year animal Site_1 2003 1 Site_2 2003 0 Site_3 2003 1 Site_1 2004 1 Site_2 2004 0 Site_3 2004 0 Site_1 2005 1 Site_2 2005 1 Site_3 2005 1
I am doing a linear mixed effect model with the site as random factor to see whether the year has an effect on the sighting of the animal.
model<-glmer(animal~year+(1|site),data =data_animal, family=binomial)
I get the problem message warning: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: large eigenvalue ratio - Rescale variables?
Why should I rescale factor variables? What I am doing wrong?