On Mon, Jul 5, 2010 at 4:00 AM, ONKELINX, Thierry <thierry.onkel...@inbo.be> wrote: > Dear Rafael, > > The line below had one closing bracket to much. The line below should > work. > > am2 <- lmer(dv ~ myfactor + (1|subject), data = mydata) > > Furthermore I would advise to change myfactor for a character variable > to a factor. >
In addition, you can simplify the data manipulation: wide <- matrix(c(20, 26, 16, 29, 22, NA, 12, 24, 17, 21, NA, 17), nrow = 6, dimnames = list(subject = paste("s", 1:6, sep = ""), myfactor = c("f1", "f2"))) long <- as.data.frame.table(wide, responseName = "dv") am2 <- lmer(dv ~ myfactor + (1|subject), data = long) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.