capscale, cca or rda followed by anova.cca. The function simply repeats constrained ordination analysis by selecting subsets of data that correspond to two factor levels.multiconstrained(method="capscale", formula, data, distance = "bray"
, comm = NULL, add = FALSE, multicomp="", contrast=0, ...)vegdist and partial match to "manhattan", "euclideancapscale. This is not used if the LHS is a data frame.anova.cca resultanova.cca.capscale, cca and rda by conducting the analysis for subsets of the community and environmental datasets that only contain two levels of a categoricl variable.
When the choice is made to return results from all contrasts (contrast=0), then the first row of the anova.cca tables for each contrast are provided. It is therefore possible to compare differences in results by modifying the "by" argument of this function (i.e. obtain the total of explained variance, the variance explained on the first axis or the variance explained by the variable alone).
When the choice is made to return results from a particular contrast (contrast>0), then the ordination result is returned and two new datasets ("newcommunity" and "newenvdata") are created that only contain data for the two selected contrasts.library(vegan)
library(MASS)
data(dune)
data(dune.env)
multiconstrained(method="capscale", dune~Management, data=dune.env,
distance="bray",add=TRUE)
multiconstrained(method="capscale", dune~Management+Condition(A1),
data=dune.env, distance="bray", add=TRUE, contrast=3)Run the code above in your browser using DataLab