I am trying to fit a mixed model to determine the effect of X
on Y
after controlling for non-independence in my data. Non-independence arises from a variable: ProductID
. I have close to 10,000 observations in my dataset and 5500 unique ProductID
. Is the average number of observations per ProductID
being too less ( < 2) a conceptual problem for fitting the below mixed model in R?
lmer(Y~ X + (1|ProductID), myData)
If it is a conceptual problem, should I be looking at some other grouping variable - such as ProductCategoryID
(100 unique ones) - in place of ProductID
to account for non-independence?