# NOT RUN {
# Simple model for the ham data:
fm <- lmer(Informed.liking ~ Product*Information + (1|Consumer) , data=ham)
# Anova table for the fixed effects:
anova(fm)
# }
# NOT RUN {
# Fit 'big' model:
fm <- lmer(Informed.liking ~ Product*Information*Gender*Age +
+ (1|Consumer) + (1|Consumer:Product) +
(1|Consumer:Information),
data=ham)
step_fm <- step(fm)
step_fm # Display elimination results
final_fm <- get_model(step_fm)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab