[R-sig-ME] Model specification: crossed vs nested factors

Richard Feldman richard.feldman at mail.mcgill.ca
Tue Aug 24 23:01:26 CEST 2010


Hello,

I am at my wit's end with regards to specifying my model, perhaps 
because I am confused about nested vs. crossed grouping factors.

My dataset has 16 sites and within each site I applied 3 treatments (A, 
B, C). The sites differ based on elevation. I originally thought I had a 
hierarchical (nested) model and specified the full model as such:

model.n <- glmer(Y ~ Treatment*Elevation + (Treatment|Site), data=Data)

The data also seemed analogous to a longitudinal model where instead of 
subject I have site and instead of time/days I have treatment. I am not 
totally clear on why this analogy breaks down.

After extensive reading, it seems that because each site receives the 
same three treatments, my model is crossed and not nested. Hence the 
specification should be:

model.c <- glmer(Y ~ Treatment*Elevation + (1|Site) + (1|Treatment), 
data=Data)

I have three questions:

1. Is model.c indeed the correct specification given my data?

2. Given model.c, does the treatment by elevation interaction capture 
this cross-scale effect, even though the former is a level-1 predictor 
(varies within site) and the latter a level-2 predictor (varies among 
sites)?

3. The output from model.c gives zero variance for the random effect of 
treatment. I assume this is because there are only three levels. Hence, 
treatment can only be a fixed variable. I have no problem with that. 
What I am confused about is how I can discover how much the 
treatment-response relationship varies among sites. I originally thought 
that (Treatment|Site) made sense because the treatment-response slope 
could vary based on site.

I appreciate all your help in getting me out of this mental quagmire. 
Thank you!

-- 
Richard Feldman, PhD Candidate
Dept. of Biological Sciences, McGill University
W3/5 Stewart Biology Building
1205 Docteur Penfield
Montreal, QC H3A 1B1
514-212-3466
richard.feldman at mail.mcgill.ca




More information about the R-sig-mixed-models mailing list