Download Species matrix - EPFL moodle service

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Écologie numérique – Lab 6 – 31.10.2016
Page 1/3
Lab 6: Multiple Factor Analysis (MFA)
Objectives
The aim of this Lab is to determine the importance of environmental variables in explaining the fish
assemblages in the different locations along the Doubs river, using constrained ordination
techniques for direct gradient analysis. In this Lab you will:
 learn how to compute multiple factor analyses (MFA), choose the correct options and
interpret properly the ordination diagrams;
Assignments

Use the worked examples Lab6_MFAHelp as a model to write your script in order to
complete step by step the following tasks.
Tasks and questions
1. ?MFA() – Look at how to perform a Multiple Factor Analysis of three blocks of variables.
Look also specifically at arguments needed such as type or name.group. Use the script
Lab6_MFAHelp which performed MFA on another data set to help you with R codes.
a. Split the environmental data frame into two data frames of variables representing the
physical and the chemical descriptors of the sites, respectively.
envph = dataframe of the physical environment ("alt" "pen" "deb")
envch = dataframe of the chemical environment ("pH" "dur" "pho" "nit" "amm" "oxy" "dbo")
b. Concatenate the species data frame and the two environmental data frames using
cbind(). Create a vector for the number of variables in each of these three groups.
Compute the Multiple Factor Analysis of this combined table using the MFA()
function of the FactoMineR library. Specify the types of variables contained in
each dataframe (type=), as well as a title for each dataframe (name.group=).
c. Among the produced plots, interpret the results of the “individual factor map” and of
the “correlation circle”.
Écologie numérique – Lab 6 – 31.10.2016
Page 2/3
d. Print eigenvalues and the amount of variation represented by each MFA axis. Print
and comment the RV coefficient matrix.
The RV coefficients are in file$group$RV, and the eigenvalues are in file$eig.
rv = file$group$RV
file$eig
e. ?coeffRV Calculate the p-values of RV coefficients between the three matrixes spe,
envph et envch
coeffRV(matrix1, matrix2)$p.value
f. Superposition of clustering and MFA:
Calculate site scores of the MFA in the full ordination space.
Calculate the Euclidean distance among sites in the ordination space using
dist()function.
Compute a Ward hierarchical clustering from the Euclidean distance among sites
in the full ordination space using hclust().
Using plot() function, plot the dendrogram of the clustering to choose the
number of clusters k
Cut the dendrogram with cutree()
Site scores are in file$global.pca$ind$coord.
Superpose the clusters onto the ordination plot of the MFA produced with
ordiplot()using symbols according to the cluster groups (points(), text()).
See the code in Lab6_MFAHelp.
(R will show an error message specifying that species score are not available…
Do not pay attention and go on…)
Écologie numérique – Lab 6 – 31.10.2016
Add the cluster dendrogram with ordicluster() and a legend using
legend().See the code in Lab6_MFAHelp.
Redo the plot for axis 1 and 3.
Interpret the results.
Page 3/3