Description Usage Arguments Details Value Author(s) References Examples

The functions provide nested analysis of variance for a two-level hierarchical model. The functions are implemented by estimating the correct F-ratio for the main and nested factors (assuming the nested factor is random) and using the recommended permutation procedures to test the significance of these F-ratios. F-ratios are estimated from variance estimates that are provided by distance-based redundancy analysis (`capscale`

) or non-parametric multivariate analysis of variance (`adonis`

).

1 2 3 |

`formula` |
Formula with a community data frame (with sites as rows, species as columns and species abundance as cell values) or (for |

`data` |
Environmental data set. |

`method` |
Method for calculating ecological distance with function |

`add` |
Should a constant be added to the off-diagonal elements of the distance-matrix (TRUE) or not. |

`permutations` |
The number of permutations for significance testing. |

`warnings` |
Should warnings be suppressed (TRUE) or not. |

The functions provide two alternative procedures for multivariate analysis of variance on the basis of any distance measure. Function `nested.anova.dbrda`

proceeds via `capscale`

, whereas `nested.npmanova`

proceeds via `adonis`

. Both methods are complementary to each other as `nested.npmanova`

always provides correct F-ratios and estimations of significance, whereas `nested.anova.dbrda`

does not provide correct F-ratios and estimations of significance when negative eigenvalues are encountered or constants are added to the distance matrix, but always provides an ordination diagram.

The F-ratio for the main factor is estimated as the mean square of the main factor divided by the mean square of the nested factor. The significance of the F-ratio of the main factor is tested by permuting entire blocks belonging to levels of the nested factor. The significance of the F-ratio of the nested factor is tested by permuting sample units within strata defined by levels of the main factor.

The functions provide an ANOVA table.

Roeland Kindt (World Agroforestry Centre)

Legendre, P. & Anderson, M. J. (1999). Distance-based redundancy analysis: testing multispecies responses in multifactorial ecological experiments. Ecological Monographs 69, 1-24.

Anderson, M.J. (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecology, 26: 32-46.

McArdle, B.H. and M.J. Anderson. (2001). Fitting multivariate models to community data: A comment on distance-based redundancy analysis. Ecology, 82: 290-297.

1 2 3 4 5 6 7 8 9 10 11 | ```
## Not run:
library(vegan)
data(warcom)
data(warenv)
# use larger number of permutations for real studies
nested.npmanova(warcom~rift.valley+popshort, data=warenv, method="jac",
permutations=5)
nested.anova.dbrda(warcom~rift.valley+popshort, data=warenv, method="jac",
permutations=5)
## End(Not run)
``` |

```
Loading required package: tcltk
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
BiodiversityR 2.11-1: Use command BiodiversityRGUI() to launch the Graphical User Interface;
to see changes use BiodiversityRGUI(changeLog=TRUE, backward.compatibility.messages=TRUE)
Warning message:
no DISPLAY variable so Tk is not available
Total sum of squares of distance matrix: 23.14977
Total sum of squares for non-parametric manova: 23.149768061689
Nested anova for popshort nested within rift.valley
Df SumsofSquares F N.Perm Pr(>F)
rift.valley 1 6.6245 8.2573 5 0.3333
popshort 3 2.4068 5.3982 5 0.1667
Residuals 95 14.1185 0.1486
Total sum of squares of distance matrix: 23.14977
Total sum of squares of distance-based redundancy analysis: 0.233836041027162
Nested anova for popshort nested within rift.valley
Df SumsOfSquares F N.Perm Pr(>F)
rift.valley 1 0.066916 8.2222 5 0.1667
popshort 3 0.024415 4.9866 5 0.1667
Residual 95 0.155046
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.