anova.cca.Rd
The function performs an ANOVA like permutation test for Constrained
Correspondence Analysis (cca
), Redundancy Analysis
(rda
) or distance-based Redundancy Analysis (dbRDA,
capscale
) to assess the significance of constraints.
# S3 method for cca anova(object, ..., permutations = how(nperm=999), by = NULL, model = c("reduced", "direct", "full"), parallel = getOption("mc.cores"), strata = NULL, cutoff = 1, scope = NULL) # S3 method for cca permutest(x, permutations = how(nperm = 99), model = c("reduced", "direct", "full"), by = NULL, first = FALSE, strata = NULL, parallel = getOption("mc.cores"), ...)
object | One or several result objects from |
---|---|
x | A single ordination result object. |
permutations | a list of control values for the permutations
as returned by the function |
by | Setting |
model | Permutation model: |
parallel | Use parallel processing with the given number of cores. |
strata | An integer vector or factor specifying the strata for
permutation. If supplied, observations are permuted only within
the specified strata. It is an error to use this when
|
cutoff | Only effective with |
scope | Only effective with |
first | Analyse only significance of the first axis. |
... | Parameters passed to other functions. |
Functions anova.cca
and permutest.cca
implement ANOVA
like permutation tests for the joint effect of constraints in
cca
, rda
, dbrda
or
capscale
. Function anova
is intended as a more
user-friendly alternative to permutest
(that is the real
workhorse).
Function anova
can analyse a sequence of constrained
ordination models. The analysis is based on the differences in
residual deviance in permutations of nested models.
The default test is for the sum of all constrained eigenvalues.
Setting first = TRUE
will perform a test for the first
constrained eigenvalue. Argument first
can be set either in
anova.cca
or in permutest.cca
. It is also possible to
perform significance tests for each axis or for each term
(constraining variable) using argument by
in
anova.cca
. Setting by = "axis"
will perform separate
significance tests for each constrained axis. All previous
constrained axes will be used as conditions (“partialled
out”) and a test for the first constrained eigenvalues is
performed (Legendre et al. 2011).
You can stop permutation tests after exceeding a given
significance level with argument cutoff
to speed up
calculations in large models. Setting by = "terms"
will
perform separate significance test for each term (constraining
variable). The terms are assessed sequentially from first to last,
and the order of the terms will influence their
significances. Setting by = "margin"
will perform separate
significance test for each marginal term in a model with all other
terms. The marginal test also accepts a scope
argument for
the drop.scope
which can be a character vector of term
labels that are analysed, or a fitted model of lower scope. The
marginal effects are also known as “Type III” effects, but
the current function only evaluates marginal terms. It will, for
instance, ignore main effects that are included in interaction
terms. In calculating pseudo-\(F\), all terms are compared to the
same residual of the full model.
Community data are permuted with choice model="direct"
, and
residuals after partial CCA/ RDA/ dbRDA with choice
model="reduced"
(default). If there is no partial CCA/ RDA/
dbRDA stage, model="reduced"
simply permutes the data and is
equivalent to model="direct"
. The test statistic is
“pseudo-\(F\)”, which is the ratio of constrained and
unconstrained total Inertia (Chi-squares, variances or something
similar), each divided by their respective degrees of freedom. If
there are no conditions (“partial” terms), the sum of all
eigenvalues remains constant, so that pseudo-\(F\) and eigenvalues
would give equal results. In partial CCA/ RDA/ dbRDA, the effect of
conditioning variables (“covariables”) is removed before
permutation, and the total Chi-square is not fixed, and test based on
pseudo-\(F\) would differ from the test based on plain
eigenvalues.
The function anova.cca
calls permutest.cca
and fills an
anova
table. Additional attributes are
Random.seed
(the random seeds used),
control
(the permutation design, see how) and
F.perm
(the permuted test statistics).
Legendre, P. and Legendre, L. (2012). Numerical Ecology. 3rd English ed. Elsevier.
Legendre, P., Oksanen, J. and ter Braak, C.J.F. (2011). Testing the significance of canonical axes in redundancy analysis. Methods in Ecology and Evolution 2, 269--277.
anova.cca
, cca
,
rda
, capscale
to get something to
analyse. Function drop1.cca
calls anova.cca
with by = "margin"
, and add1.cca
an analysis
for single terms additions, which can be used in automatic or
semiautomatic model building (see deviance.cca
).
#> Permutation test for cca under reduced model #> Permutation: free #> Number of permutations: 999 #> #> Model: cca(formula = varespec ~ Al + P + K, data = varechem) #> Df ChiSquare F Pr(>F) #> Model 3 0.64413 2.984 0.001 *** #> Residual 20 1.43906 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1#> Permutation test for cca under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #> #> Model: cca(formula = varespec ~ Al + P + K, data = varechem) #> Df ChiSquare F Pr(>F) #> Al 1 0.29817 4.1440 0.001 *** #> P 1 0.18991 2.6393 0.003 ** #> K 1 0.15605 2.1688 0.025 * #> Residual 20 1.43906 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1#> Permutation test for cca under reduced model #> Marginal effects of terms #> Permutation: free #> Number of permutations: 999 #> #> Model: cca(formula = varespec ~ Al + P + K, data = varechem) #> Df ChiSquare F Pr(>F) #> Al 1 0.31184 4.3340 0.001 *** #> P 1 0.16810 2.3362 0.014 * #> K 1 0.15605 2.1688 0.021 * #> Residual 20 1.43906 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1#> Permutation tests for cca under reduced model #> Permutation: free #> Number of permutations: 999 #> #> Model 1: varespec ~ Al + P + K #> Model 2: varespec ~ N + P + K + Ca + Mg + S + Al + Fe + Mn + Zn + Mo + Baresoil + Humdepth + pH #> ResDf ResChiSquare Df ChiSquare F Pr(>F) #> 1 20 1.43906 #> 2 9 0.64171 11 0.79735 1.0166 0.439