Dear Rabin,
The mail list has stripped your csv file. Send small files as txt. Or put
the data somewhere online and send the link.
You want to use a random intercept to model the effect of an experimental
unit which is not captured by your fixed effects. E.g. for each combination
of replicate, crop and tillage you have 3 types of cover. So you want a
"tillage" level random intercept to model this. You can do this by
assigning a unique id to each combination of replicate (4), crop (2) and
tillage (3) = 36 subplot. So number your subplots for 1 to 36. With such
unique ids you don't have to worry about (partially) nested or (partially)
crossed effects. See
https://www.muscardinus.be/2017/07/lme4-random-effects/
You can do the same thing at the crop level: unique combinations of
replicate (4) and crop (2) = 8 combinations. The problem is that for a
descend estimate of the random effect variance, you need a lot of levels (>
200) see https://www.muscardinus.be/2018/09/number-random-effect-levels/.
If you only want to use random intercept to correct for dependencies within
the data, then you can get a way with a smaller number (>10). In your case,
you have too few replicates to take the replicate and replicate/crop plot
effect into account. So I recommend that you only take the subplots
(replicate/crop/tillage) into account. Note that this effect will take up
any effect at a higher level (replicate/crop) when you don't model that
effect.
I'd go for lmer(biomass~crop*tillage*cover+ (1|subplot),data=data)
Best regards,
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx at inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be
///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////
<https://www.inbo.be>
Op ma 9 sep. 2019 om 20:36 schreef Rabin KC <kc000001 at umn.edu>:
Hello R mixed models community,
I am trying to fit a model for a split- split-plot design using lmer. I
know how to do this with aov and ssp.plot function in agricolae, but I
need
to use lmer in this case.
I am interested in the response variable biomass of cover crops. I have
the
main plots as crops (corn and soybean). The subplot is tillage, which is
randomized within the crops and has 3 levels (conventional-till, no-till,
and strip-till). Within tillage(sub plot), 3 cover crop strategies are
randomly assigned (AR, ARCC, ARCCFR). Therefore 1 rep (block) has 18
treatments. The whole experiment is replicated 4 times, therefore, total
experimental units equal to 72 units.
Data arranged in a csv file is attached in this email.
Now the analysis part:
I know how to do this using aov/ ssp.plot( agricolae). The code is as
follows:
model<-with(data,ssp.plot(rep,crop,tillage,cover,biomass)).
Same thing with aov:
model1<aov(cover_coverage~rep+crop*tillage*cover+Error(rep/crop/tillage),data=data)
For my analysis using lmer, and lme, I have the following code:
model2<-lmer(biomass~crop*tillage*cover+ (1|rep),data=data)
model3<-lme(fixed=biomass~crop*tillage*cover, data=data, random=~1|rep)
Now my confusion and questions are:
1. I have used crop, tillage, and cover as fixed effects. And only the rep
(block) as random. Is the random effect properly assigned for this design?
2. I have read a lot about crossed and nested design. Crawley and Oehlert
give particular examples about it, but I have trouble understanding if
this
design has nested factors or crossed factors.
I would be very relieved to receive feedback with the matter in hand.
Looking forward, and thank you a lot,
Sincerely,
Rabin