For my GUI, I would like the user to be able to compare a fixed effects
model with a random effects model. For example:
fm0 <- lmer(Reaction ~ Days, sleepstudy);
fm1 <- lmer(Reaction ~ Days + (1|Subject), sleepstudy);
anova(fm0,fm1);

However, this returns the obvious "No random effects terms specified in
formula" error for the first model. I've also tried fitting the fixed
effects model with lm:

fm0 <- lm(Reaction ~ Days, sleepstudy);
fm1 <- lmer(Reaction ~ Days + (1|Subject), sleepstudy);
anova(fm0,fm1);

However, now the anova function starts complaining. Is there a way to
perform variance analysis on a fixed only model and a random effects model,
similar to comparing two random effects models?

	[[alternative HTML version deleted]]


