I run
ModelOne <- lm(OneMilkProd~ RobotsPen+FreshGroup+RobotFeeds+LiquidFeed, data = FarmAVG)
but was suggested to include farm as a random effect.
There is 1 farm per OneMilkProd, and each farm has its own variation of RobotsPen + FreshGroup + RobotFeeds + LiquidFeed
When I make the model LMER
ModelOne <- lmer (OneMilkProd~ RobotsPen+FreshGroup+RobotFeeds+LiquidFeed + (1\Farm) , data = FarmAVG)
Error: number of levels of each grouping factor must be < number of observations (problems: Farm)
I receive the error above. I tried making the argument that 1 observation per response is not enough for a random effect.
All predictors are categorical and the response is continuous