This is my data.
'data.frame': 100 obs. of 11 variables:
X : int 1 2 3 4 5 6 7 8 9 10 ...
Lifestage: chr "AD" "AD" "AD" "AD" ...
Inac : int 24 12 2 4 22 20 12 12 16 22 ...
Forg : int 5 8 0 13 13 2 8 7 7 17 ...
Groom : int 13 9 9 2 25 25 7 8 19 13 ...
Coop : int 1 21 0 5 10 11 24 17 16 12 ...
Agr : int 0 4 1 3 5 4 2 1 6 2 ...
Prov : int 7 6 0 0 5 0 5 3 3 1 ...
Beg : int 0 9 1 0 1 2 9 9 7 5 ...
Begg : logi TRUE FALSE FALSE TRUE FALSE FALSE ...
HLact : int 8 40 2 8 21 17 40 30 32 20 ...
I am using mixed model using formula:
> full = glmer.nb(Groom ~ Lifestage + (1 | Inac) * (1 | Coop) * (1 | Agr) *
(1 | Prov) * (1 | Beg), data = d)
But, when I am trying to visualize the model using 'flexplot' package,
visualize(full, plot = "model", sample = 3)
this is showing an error :
Error in model.frame.default(tt, newdata.NA, na.action = na.pass, xlev = orig.random.levs) : variable lengths differ (found for 'Agr')
I am trying to visualize the mixed model, but an error is showing that variable lengths differ. Why and how to fix this error ?