I would go for package lme4
.
If I understand correctly, mF
below should be your model. It has condition
as a fixed effect, while judge
and subject
as a random intercepts.
library(lme4)
# m0 = Null model without the fixed effects.
# m1 = Your model including the fixed effects.
# Set REML = FALSE for a meaningful model comparison
# Basically, ANOVA uses ML for mer objects.
m0 <- lmer(rating ~ 1 + (1|judge) + (1|subject), data = data, REML = FALSE)
mF <- lmer(rating ~ condition + (1|judge) + (1|subject), data = data, REML = FALSE)
summary(m0)
summary(mF)
anova(m0, mF)
# If significant, fit the final model using REML = TRUE
# This is often recommended since it usually gives better estimates for random effects.
mF <- lmer(rating ~ condition + (1|judge) + (1|subject), data = data, REML = FALSE)
Edit: Per discussion below.