anova.wrda {douconca} | R Documentation |
Permutation Test for weighted redundancy analysis
Description
anova.wrda
performs residual predictor permutation for weighted
redundancy analysis (wRDA), which is robust against differences in the
weights (ter Braak, 2022). The arguments of the function are similar to
those of anova.cca
, but more restricted.
Usage
## S3 method for class 'wrda'
anova(object, ..., permutations = 999, by = c("omnibus", "axis"))
Arguments
object |
an object from |
... |
unused. |
permutations |
a list of control values for the permutations as
returned by the function |
by |
character |
Details
The algorithm is based on published R-code for residual predictor permutation in weighted redundancy analysis (ter Braak, 2022), but using QR-decomposition instead of ad-hoc least-squares functions.
Value
A list with two elements with names table
and eigenvalues
.
The table
is as from anova.cca
and
eigenvalues
gives the wrda eigenvalues.
References
ter Braak, C.J.F. (2022) Predictor versus response permutation for significance testing in weighted regression and redundancy analysis. Journal of statistical computation and simulation, 92, 2041-2059. doi:10.1080/00949655.2021.2019256
Examples
data("dune_trait_env")
# rownames are carried forward in results
rownames(dune_trait_env$comm) <- dune_trait_env$comm$Sites
response <- dune_trait_env$comm[, -1] # must delete "Sites"
w <- rep(1, 20)
w[1:10] <- 8
w[17:20] <- 0.5
object <- wrda(formula = ~ A1 + Moist + Mag + Use + Condition(Manure),
response = response,
data = dune_trait_env$envir,
weights = w)
object # Proportions equal to those Canoco 5.15
mod_scores <- scores(object, display = "all")
scores(object, which_cor = c("A1", "X_lot"), display = "cor")
anova(object)