Hello,

I was wondering if this approach is reasonable and I would be happy about
any comments.
For testing differences between treatments (Control, Impact) in the BACI
that Keith described I thought to use pairwise before-after dissimilarities
as below:

library(vegan)

# some data
d <- matrix(round(rnorm(16*6, 1, 0.25), 1), 16, 6, dimnames = list(1:16,
paste0("SP", 1:6)))

# the BACI-design, C = "control", "I" = "impact"
m <- expand.grid(1:4, Treatment = c("C", "I"), BA = c("before",
"after"))[-1]
m$matchID <- c(rep(1:8, 2))
(m <- data.frame(m[, 3:1], row.names = NULL))

# data with equally abundant species across all groups:
cbind(m, d)

# simulate effect only for BA-level "after" in treatment-group "I":
ran <- function() round(rnorm(16, c(rep(1, 12), rep(2, 4)), 0.25), 1)

# apply ran() to some of the species
for(i in c(1,3,6)) d[, i] <- ran()

# see data with simulated effect for species 1, 3 & 6 at BA-level "after"
# and treatment-level "I":
cbind(m, d)

# check the effect in an ordination diagramm
# you'll see that in the control-group "after" is
# similar to control "before" and similar to the impact-group "before"
# whereas in the impact-group 'after' is very dissimilar and thus
# exhibits a location-shift:
sol <- metaMDS(d, "bray")

plot(sol,type="n")
ordipointlabel(sol, display = "sites", pch ="")
points(sol, display = "sites", select=which(m$BA=="before"),
       pch = 21, col="black", bg="black")
points(sol, display = "sites", select=which(m$BA=="after"),
       pch = 21, col="black", bg="white")
ordihull(sol, group=paste0(m$T, m$BA), lty=2)

# Now, what if I don't test a shift in locations, as I would with adonis -
# I could rather simplify the hypothesis to: "In the impact-group the
'after' plots will be
# more dissimilar from the 'before' plots compared to the control-plots".
To test this I could take the
# the pairwise "before-after" dissimilarities and use this as a new
variable in
# any one-way test for univariate data, like so:

# pairwise (before-after) dissimilarities:
dis_pws <- data.frame(Dissim = do.call("cbind", list(by(d, m$matchID,
function(x) vegdist(x[1:2,], "bray")))))
dis_pws$Treatment <-  gl(2, 4, labels = c("Control", "Impact"))

summary(lm(Dissim ~ Treatment, dis_pws))
dev.new()
boxplot(Dissim ~ Treatment, dis_pws, ylab = "Before-After Dissimlarity")


2013/1/17 Keith Post <kpost@rams.colostate.edu>

> Hello,
>
> I have a simple BACI design with four plots exposed to herbivory and four
> without herbivores.  I quantified the densities of nematode trophic groups
> before and after manipulating herbivory.  So there is one treatment factor
> (+/- herbivory) and a time variable (before/after), and the data are
> balanced.
> Here is a sample of my data:
>
> Plot Time Treatment   BF        FF         PP        Om
>
> 1    A      Cont 17.211259 2.0320259 11.1151816 3.9218100
>
> 2    A      Cont 26.991283 5.1102956 10.0989175 2.8187742
>
> 3    A        GH  6.295530 0.6860513  2.0985099 1.9169081
>
>
> Since I want to see whether herbivory affects how nematode communities
> change, I'm interested in the herbivory * time interaction.
>
> I've tried to analyze a Bray-Curtis dissimilarity matrix of my nematode
> data using the following code:
>
> adonis(nema.troph.bc~Treatment*Time,data=nema,permutations=999)
>
>
> Although this returns an interaction (and main effects), it ignores the
> repeated measures aspect of my design.  How do I incorporate this into
> adonis() or another function.
>
>
> Thanks,
>
>
>
> Keith
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>



-- 

Kay Cichini, MSc Biol

Grubenweg 22, 6071 Aldrans

Tel.: 0650 9359101

E-Mail: kay.cichini@gmail.com

Web: www.theBioBucket.blogspot.co.at<http://www.thebiobucket.blogspot.co.at/><http://www.theBioBucket.blogspot.co.at>
--

	[[alternative HTML version deleted]]

