Dear all,

I'm using lmer from lme4 package but I am not sure of what I'm doing.

The dataset has the following variables :
- Treatment (fixed, 3 levels)
- Location (fixed, 4 levels)
- Sample (random, 5 levels). 5 samples are taken in each location (randomly)
- Subsample (random, 3 levels). 3 subsamples are taken in each sample. One
treatment is assigned (randomly) to one of the subsample.

The study was conducted every Wednesday during 15 weeks in 2013, from week
32 to week 47 (no observations for week 33).

For the first location, samples are taken weeks 32, 36, 39, 42 and 49.
For the second location, samples are taken the week 46.
For the third location, samples are taken weeks 35, 38, 41 and 44.
For the 4th location, samples are taken week 34, 37, 40, 43, 47.

For each location* i*, week *j(i)*, sample* k(ij)* and treatment *l*, the
"richness in sugar" of each subsample has been recorded.
The aim of the study is to see if there is an effect of the factor
"treatment" on the response "richness".

I am new in mixed model so I did some research but I am a little bit
confused with the sampling design.

I consider "location", "week" and "sample" as random factor, with sample
nested in week nested in location.
To avoid implicitly nested representations, "sample" has been recoded
(factor with 75 levels (5 samples*15 weeks)).

I write in R:
lmer(richness ~ treatment + (1|location) + (1|week) + (1|sample), data =
mydata)

Is my model correct ?

Thank you for your help

	[[alternative HTML version deleted]]

