Re: [R] lmer() with no intercept

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri, 11 Jun 2010 20:34:20 -0400

Try a different example:

set.seed(123)

N <- 24
k <- 6
x <- 1:N
f <- rep(rnorm(k, 0, 4), each = N/k)
e <- rnorm(N)
y <- x + f + e

fac <- gl(k, N/k)
library(lme4)
fm1 <- lmer(y ~ x + (1|fac)); fm1
fm0 <- lmer(y ~ x -1 + (1|fac)); fm0

plot(y, fitted(fm0))
abline(a = 0, b = 1, lty = 2, col = "blue")



R-help_at_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. Received on Sat 12 Jun 2010 - 00:36:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 12 Jun 2010 - 01:00:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive