This function is a wrapper to adonis
but performs type II tests (whereas adonis
performs type I).
adonis.II(formula, data, ...)
a typical model formula such as Y~A+B*C
, but where Y
is either a dissimilarity object (inheriting from class "dist"
) or data frame or a matrix; A
, B
, and C
may be factors or continuous variables.
the data frame from which A
, B
and C
would be drawn.
additional arguments to adonis
. See help of this function.
a data frame of class "anova"
.
See adonis
for detailed explanation of what is done. The only difference with adonis
is that adonis.II
performs type II tests instead of type I.
# NOT RUN {
require(vegan)
data(dune)
data(dune.env)
# Compare:
adonis(dune~Management*A1,data=dune.env,permutations=99)
adonis(dune~A1*Management,data=dune.env,permutations=99)
# With:
adonis.II(dune~Management*A1,data=dune.env,permutations=99)
adonis.II(dune~A1*Management,data=dune.env,permutations=99)
# }
Run the code above in your browser using DataLab