0

I have some hierarchical data and I'm struggling to figure out how to code it in my model. The data was taken on 20 individuals from 18 total sites: 9 sites in year 1 and 9 sites in year 2 and each site is in one of three treatments. So site is nested in year and in treatment, but year and treatment are crossed. I want to include site as a random factor, but I'm not sure how to account for the fact that it's nested within two other factor variables.

  • 1
    From your description, site and year seem confounded, so I'm not sure it's worth including year at all. – mkt May 30 '23 at 06:04
  • Also, the nesting/crossing issue is dependent on how you code the factor levels: https://stats.stackexchange.com/questions/228800/crossed-vs-nested-random-effects-how-do-they-differ-and-how-are-they-specified – mkt May 30 '23 at 13:55

0 Answers0