Hi list



I'm having trouble plotting a mixed model that includes log transformed (or any transformed) terms.



library(lme4)

library(effects)

data(cake, package="lme4")

###this works

fm1 <- lmer(angle ~ recipe * temperature + (1|recipe:replicate), cake, REML = FALSE)

plot(Effect(c('recipe','temperature'), fm1))



##but this doesn't (log transformed angle)

fm2 <- lmer(log(angle) ~ recipe * temperature + (1|recipe:replicate), cake, REML = FALSE)

plot(Effect(c('recipe','temperature'), fm2))



###returns the error:

Error in plot(Effect(c("recipe", "temperature"), fm2)) :

error in evaluating the argument 'x' in selecting a method for function 'plot': Error in eval(expr, envir, enclos) : object 'angle' not found



However, including log-transformed terms works for a simple linear model



mod <- lm(log(prestige) ~ income*type, data=Prestige)

plot(Effect(c("income","type"), mod))



Including a function in a model (e.g. fm2) used to work in an older version of the 'effects' package (sorry can't version) but obviously not anymore. Any thoughts on how to get fm2 to work without having to transform variables beforehand, if it is indeed still possible?



Cheers



John



	[[alternative HTML version deleted]]

