anova.cca {vegan} | R Documentation

## Permutation Test for Constrained Correspondence Analysis, Redundancy Analysis and Constrained Analysis of Principal Coordinates

### Description

The function performs an ANOVA like permutation test for Constrained Correspondence Analysis (`cca`), Redundancy Analysis (`rda`) or Constrained Analysis of Principal Coordinates (`capscale`) to assess the significance of constraints.

### Usage

    ## S3 method for class 'cca':
    anova(object, alpha=0.05, beta=0.01, step=100, perm.max=10000,
          by = NULL, ...)
    permutest.cca(x, permutations=100, model=c("direct", "reduced","full"),
          first = FALSE, strata, ...)

### Arguments

`object,x` | A result object from `cca`.
`alpha` | Targeted Type I error rate.
`beta` | Accepted Type II error rate.
`step` | Number of permutations during one step.
`perm.max` | Maximum number of permutations.
`by` | Setting `by = "axis"` will assess significance for each constrained axis, and setting `by = "terms"` will asses significance for each term (sequentially from first to last).
`...` | Parameters to permutest.cca.
`permutations` | Number of permutations for assessing significance of constraints.
`model` | Permutation model (partial match).
`first` | Assess only the significance of the first constrained eigenvalue; will be passed from `anova.cca`.
`strata` | An integer vector or factor specifying the strata for permutation. If supplied, observations are permuted only within the specified strata.

### Details

Functions `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. However, with `by = "terms"` a fixed number of permutations will be used, and this is given by argument `permutations`, or if this is missing, by `step`.

The function `permutest.cca` implements a permutation test for the ``significance'' of constraints in `cca`, `rda` or `capscale`. Community data are permuted with choice `model = "direct"`, residuals after partial CCA/RDA/CAP with choice `model = "reduced"`, and residuals after CCA/RDA/CAP under choice `model = "full"`. If there is no partial CCA/RDA/CAP stage, `model = "reduced"` 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. 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/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 is a weighted method, and environmental data are re-weighted at each permutation step using permuted weights.

Default test will be 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. 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. In calculating pseudo-F, all terms are compared to the same residual of the full model. Permutations for all axes or terms will start from the same `.Random.seed`, and the seed will be advanced to the value after longest permutation at the exit from the function.

### Value

Function `permutest.cca` returns an object of class `permutest.cca` which has its own `print` method. The function `anova.cca` calls `permutest.cca`, fills an `anova` table and uses `print.anova` for printing.

### Author(s)

Jari Oksanen

### References

Legendre, P. and Legendre, L. (1998). Numerical Ecology. 2nd English ed. Elsevier.

### See Also

`cca`, `rda`, `capscale`.

### Examples

    data(varespec)
    data(varechem)
    vare.cca <- cca(varespec ~ Al + P + K, varechem)
    anova(vare.cca)
    anova(vare.cca, by="axis", perm.max=500)
    anova(vare.cca, by="terms", permu=200)

[Package vegan version 1.8-8 Index]