Error with multcomp glht

I am trying to run a multiple comparisons on an anova for a lmer. I am getting the following error:

Error in Ktotal[count:(count + nrow(h$K) - 1), h$where] <- h$K :
number of items to replace is not a multiple of replacement length

The model is the following:

rest1 <- lmer(rest~sex+age+season+month+session+(1|id), data = mydata)

the variable "month" is what I want to compare and it has 6 factors with the following # of observations:

APRIL DEC JAN JUNE MAY NOV
269 579 377 303 355 395

When I run the glht for other variables with only 2 factors like season, which only has wet vs dry, it runs fine, no error. Am I getting this message because of the unbalanced groups of months?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.