[R-sig-eco] split-split-plot design and adonis

s.graham sharon.graham at pg.canterbury.ac.nz
Tue May 14 09:05:57 CEST 2013


Hi all, 

Just wanted to update this and share something Steve Brewer and I have come
up with over email - many thanks again to Steve for all his help!  It was
based on his comment that we could use centroids to create distance
matrices.  I used betadisper to create the centroids for each combination of
treatments within a nestedness level (i.e. plot, sub-plot, sub-sub-plot) and
then used the euclidean distance matrices generated by betadisper as the
community matix for adonis.  To create the centroids, I had to create an
additional factor (PlotSubplot, or TreatmentShade for my data), which
combines the main plot effect, the subplot main effect, and the plot:subplot
interaction into a single source of variation.  We used this factor with
nested.npmanova from the BiodiversityR package for the overall Treatment
effect, and adonis for the other effects and interactions.  The code is
below, I would appreciate any comments and/or criticisms of this approach. 

Cheers,
Sharon

dis<-vegdist(invert.hel,method="bray")

# Treatshade (new factor, 4 levels) combines trt main effect, shade main
effect, and trt:shade           ## interaction into a single source of
variation
## = nonrandom whole plot and split plot variation. 3 df.

group<-factor(TreatShade, labels = c("TS","TNS","CS","CNS"))
centroid1<-betadisper(dis, group, type = "centroid")
plot(centroid1)

# to get the full centroid matrix (all PCoA axes)

centroid1matrix<-centroid1$vectors

library(BiodiversityR)   # must be run in R 3.0

# Plot main effect
# between-subtreatment is tested with plot; plot is tested with the residual
error term but that latter  ## test is not correct in this instance 

model<-nested.npmanova(centroid1matrix ~ Treatment + Plot, factor.levels,
method="euclidean", perm=999)


# within subjects (sub-plot effects)
## Strata restricts the permutation, and uses the residual error term to
test all effects, which gives the ## correct test for the sub-plot effect
and the betweensubtrtmnt * subplot interaction, but the test for ## the
betweensubtrmnt main effect will be wrong because plot, and not the residual
error term, is the ## correct error term for testing that.
# Plot will be treated as a block for the within-subjects effects and thus
could be considered a random ##effect.

model2<-adonis(centroid1matrix~Treatment*Shade+Plot, strata=Plot,
method="euclidean", perm=999)


group<-factor(TreatmentShadeHabitat) # creates 8 centroids at lowest level
of nestedness
centroid2<-betadisper(dis, group, type = "centroid")
centroid2matrix<-centroid2$vectors

model3<-adonis(centroid2matrix ~ TreatShade + Habitat  + Shade:Habitat +
Treatment:Habitat + Treatment:Shade:Habitat + Plot, strata=Plot,
method="euclidean", perm=999)






--
View this message in context: http://r-sig-ecology.471788.n2.nabble.com/split-split-plot-design-and-adonis-tp7332029p7578135.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.



More information about the R-sig-ecology mailing list