R source code


PhD project



manovRDa: R function for two-way MANOVA-like RDA, with fixed or random factors


This function was based on the function "rdaTest" (Legendre et al. 2005).

To use it, simply copy/paste all the text in the R console.

Although this function can allow one to do a classic univariate or multivariate ANOVA with two main factors and their interaction (provided that factors and interaction are coded as orthogonal dummy variables; see Legendre & Anderson 1999, Appendix C) , it was specially written to test the effects of space, time, and the space x time interaction on community composition (Laliberté et al. in review). To allow this, space-time interaction must be coded with PCNM variables (see Borcard & Legendre 2002). It calculates the p-values through permutation testing.

For more information on testing the space x time interaction, refer to this presentation by Legendre & Borcard given at the Ecological Society of America (ESA) 2005 meeting in Montréal, where they have first presented this statistical test.


Laliberté, E., Paquette, A., Legendre, P., and A. Bouchard. Assessing the scale-specific importance of niches and other spatial processes on beta diversity: a case study from a temperate forest. Oecologia (in review).

Legendre, P., Borcard, D., and P. Peres-Neto. 2005. Analyzing beta diversity: partitioning the spatial variation of community composition data. Ecological Monographs (75): 435-450.

Borcard, D., and P. Legendre. 2002. All-scale spatial analysis of ecological data by means of principal coordinates of neighbour matrices. Ecological Modelling (153): 51-68

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