[R-lang] random factor nested in a fixed factor with lmer

Jonathan Berant yonatansito at gmail.com
Tue Jan 15 07:43:26 UTC 2008


> why don't you recode your item effect as religData$realItemId <-
as.factor(paste(as.character(religData$item), as.character(religData$cond)))and
then run lmerA = lmer(expScore~(relig+sex+cond) ^2+(1|subjId) + (1|realItemId)
data=religData)
> not assuming any nesting? That should work, right?Florian

Yes! That's the solution I tried, but as a beginner with this (pretty cool)
software I thought I would check if there is a more formal way of dealing with
that. But indeed this works, thank you!




More information about the R-lang mailing list