cca), Redundancy Analysis
(rda) or Constrained Analysis of Principal Coordinates
(capscale) to assess the significance of constraints.## S3 method for class 'cca':
anova(object, alpha=0.05, beta=0.1, step=100, perm.max=2000, ...)
permutest.cca(x, permutations=100, model=c("reduced","full"), strata)cca.permutest.cca returns an object of class
permutest.cca which has its own print method. The
function anova.cca fills in an anova table and
uses print.anova for printing.anova.cca and permutest.cca implement an ANOVA
like permutation test for the joint effect of constraints in
cca, rda or capscale.
Functions anova.cca and permutest.cca differ in printout
style and in interface.
Function permutest.cca is the proper workhorse, but
anova.cca passes all parameters to permutest.cca. In anova.cca the number of permutations is controlled by
targeted ``critical'' $P$ value (alpha) and accepted Type
II or rejection error (beta). If the results of permutations
differ from the targeted alpha at risk level given by
beta, the permutations are
terminated. If the current estimate of $P$ does not
differ significantly from alpha of the alternative hypothesis,
the permutations are
continued with step new permutations.
The function permutest.cca implements a permutation test for
the ``significance'' of constraints in cca,
rda or capscale. Residuals after
partial CCA/RDA/CAP are permuted with choice model = "reduced",
and residuals after CCA/RDA/CAP under choice model = "full".
If there is no partial CCA/RDA/CAP stage, the former simply permutes
the data. 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 ranks. In plain
CCA/RDA/CAP under reduced model, the community data is permuted, and
the sum of all eigenvalues
remains constant, so that pseudo-$F$ and eigenvalues would give
equal results. In partial CCA/RDA/CAP, the effect of conditioning variables
(``covariables'') is removed before permutation, and these residuals
are added to the non-permuted fitted values of partial CCA (fitted
values of X ~ Z). Consequently, the total Chi-square is not
fixed, and test based on pseudo-$F$ would differ from the test based on
plain eigenvalues.
cca, rda, capscale.data(varespec)
data(varechem)
vare.cca <- cca(varespec ~ Al + P + K, varechem)
anova(vare.cca)
permutest.cca(vare.cca)
## Test for adding variable N to the previous model:
anova(cca(varespec ~ N + Condition(Al + P + K), varechem), step=40)Run the code above in your browser using DataLab