3

I'm trying to understand the examples provided in this post and have tracked down a lot of syntax information. The specific example is:

m2 <- lmer(Obs ~ Treatment * Day + (1+Day|Subject), mydata)

I'm understanding most of it, but I can't find what the 1+Day means, particularly in the context of (1+Day|Subject) and trying to google 1+ is a lost cause. Can anyone please help?

More generally, in plain English it seems like it's saying something like: The observation depends on the treatment on that day and all the daily measurements for that subject? Is that even in the ballpark?

Zai
  • 153
  • 4

1 Answers1

5

+1 in R formula is intercept term. (1+Day|Subject) is random intercept and random slope for Day for levels of Subject.

Tim
  • 108,699
  • 20
  • 212
  • 390