Simultaneous Analysis of a Sequence of Paired Ecological Tables:
A Comparison of Several Methods.
On-line reproduction of the paper by Thioulouse J. (2011)*
(PDF file).
This web page allows to redo all the computations and graphical displays
thanks to the Rweb system.
You can play with the R code and click the "Do it again !" buttons.
The full R code is available here:
allCode.R.
* Thioulouse J. (2011). Simultaneous Analysis of a Sequence of Paired Ecological Tables: A Comparison of Several Methods. Annals of Applied Statistics, 5, 2300-2325.
(PDF file).
1. Summary
A pair of ecological tables is made of one table containing environmental variables (in columns), and another table containing species data (in columns). The rows of these two tables are identical and correspond to the sites where environmental variables and species data have been measured. Such data are used to analyse the relationships between species and their environment. If sampling is repeated over time for both tables, one obtains a sequence of pairs of ecological tables. Analysing this type of data is a way to assess changes in species-environment relationships, which can be important for conservation Ecology or for global change studies. We present the COSTATIS analysis, a new data analysis method adapted to the study of this type of data, and we compare it to two other methods on the same data set, STATICO and BGCOIA. All three methods are implemented in the ade4 package for the R environment.
2. BGCOIA
This section can be used to redo the computations and graphical displays of Between-Group Co-Inertia Analysis (BGCOIA). First the ade4 library and the "meau" data set are loaded. A correlation matrix PCA (acpmil) is done on the environmental parameters table (meau$mil), and a covariance matrix PCA (acpfau) is done on the Ephemeroptera species table (meau$fau) with the dudi.pca function. Co-inertia analysis (coinfm) is then computed on these two analyses with the coinertia function. The BGCOIA (bgcoinfm) is then computed with the betweencoinertia function, using the output of co-inertia analysis (coinfm) and the site factor (meau$plan$sta).
Graphical displays are plotted with the s.arrow function, using species and environmental variable loadings (bgcoinfm$l1 and bgcoinfm$c1). The graph of sites is plotted with the s.class function, using the row scores of the two tables (bgcoinfm$msX and bgcoinfm$msY) and the site factor (meau$plan$sta).
Note that the sign of axes is arbitrary and has been changed here to get figures comparable to the figures in the AoAS paper.
3. STATICO
This section can be used to redo the computations and graphical displays of STATICO.
3.1 Interstructure and compromise
Two Within-Group PCA are computed. The first one (wit1) is a normed Within-Group PCA on the environmental parameters table (meau$mil) with the site factor and using the withinpca function. The second one (wit2) is a Within-Group PCA on species data (meau$fau) with the site factor and using the within function.
Two K-tables are computed (kta1 and kta2), starting from the two Within-Group analyses, with the ktab.within function. The STATICO analysis (statico1) is then obtained with the statico function on these two ktabs.
Graphs are plotted using the s.corcircle (interstructure, statico1$RV.coo), s.arrow (compromise rows, statico1$l1 and compromise columns, statico1$c1), and plot (squared cosines, statico1$cos2 vs. statico1$tabw) functions.
3.2 Intrastructure (Variables and species)
Computations are identical to section 3.1. Graphical displays are obtained using environmental variables and species loadings (statico1$Tli and statico1$Tco) with the s.arrow function.
3.3 Intrastructure (Sites)
Computations are identical to section 3.1. Graphical displays are obtained using site scores (statico1$supIX and statico1$supIY) with the s.label and s.traject functions.
4. COSTATIS
This section can be used to redo the computations and graphical displays of COSTATIS. Two Within-Group PCA are computed. The first one (wit1) is a normed Within-Group PCA on the environmental parameters table (meau$mil) with the site factor and using the withinpca function. The second one (wit2) is a Within-Group PCA on species data (meau$fau) with the site factor and using the within function.
Two K-tables are computed (kta1 and kta2), starting from the two Within-Group analyses, with the ktab.within function. The COSTATIS analysis (costatis1) is then obtained with the costatis function on these two ktabs.
Graphical displays are obtained by superimposition of site scores (costatis1$supIX) and environmental variable loadings (costatis1$c1) or of site scores (costatis1$supIY) and species loadings (costatis1$l1), using the s.arrow and s.class functions.
If you have any problems or comments, please contact
Jean Thioulouse.