evoNSCA {adiv}R Documentation

Evolutionary Non-Symmetric Correspondence Analysis

Description

The function performs evoNSCA (Pavoine 2016): an adaptation of the non-symmetric correspondence analysis (NSCA) (see e.g. Kroonenberg and Lombardo 1999) to analyse the distributions of lineages among sites and, simultaneously, to analyse the phylogenetic composition of sites.

Usage

evoNSCA(phyl, comm, scannf = TRUE, nf = 2, abundance = TRUE)

Arguments

phyl

an object inheriting the class phylo (see package ape), phylo4 (see package phylobase) or hclust. To ease the interpretation of factorial maps, it is advised to use a rooted phylogenetic tree and to add labels to the nodes of the phylogeny. For example, If your phylogeny is named 'tree' and is of class phylo, you can root the phylogeny using tree$root.edge <- 0 and you can name the nodes with the following command: tree$node.label <- paste("n", 1:tree$Nnode, sep=""). Use plot(tree, show.node.label=TRUE) to see the result. If it is rooted and of class phylo4, you can use: nodeLabels(tree) <- paste("n", 1:nNodes(tree), sep="").

comm

a data frame or a matrix typically with communities as rows, species as columns and presence/absence (1/0) or an index of abundance as entries. Species should be labeled as in the phylogenetic tree where they are the tips.

scannf

a logical value indicating whether the screeplot (eigenvalues) should be displayed for choosing the number of axes to be kept.

nf

if scannf is FALSE, an integer indicating the number of axes to be kept.

abundance

a logical value, if FALSE, only the presences/absences of the evolutionary units in sites are considered.

Value

evoNSCA returns an object of class evoNSCA and of class dudi (see package ade4). Graphical tools are associated with class dudi in packages ade4 and adegraphics (see section "Examples" below).

The returned object contains the following components:

tab

a data frame with n rows and p columns, with communities as rows and nodes of the phylogeny as columns. Internal data frame used by the algorithm;

cw

weights attributed to the nodes of the phylogeny, a vector with p components;

lw

weights attributed to the communities, a vector with n components;

eig

vector of eigenvalues;

rank

integer, number of axes;

nf

integer, number of kept axes;

c1

normed scores for the nodes of the phylogeny, data frame with p rows and nf columns;

l1

normed scores for the communities, data frame with n rows and nf columns;

co

scores for the nodes of the phylogeny, data frame with p rows and nf columns;

li

scores for the communities, data frame with n rows and nf columns;

call

the original call.

If X is an object of class evoNSCA, then attributes(X)$phy contains the phylogenetic tree (of class phylo) with names for internal nodes.

Author(s)

Sandrine Pavoine sandrine.pavoine@mnhn.fr

References

Pavoine, S. (2016) A guide through a family of phylogenetic dissimilarity measures among sites. Oikos, 125, 1719–1732.

Kroonenberg PM, Lombardo R (1999) Nonsymmetric correspondence analysis: a tool for analysing contingency tables with a dependence structure. Multivariate Behavioral Research, 34, 367–396.

See Also

evoCA, evopcachord, evopcahellinger, evodiss

Examples

## Not run: 
if(require(ade4) && require(ape) && require(adegraphics)){
O <- adegpar()$plabels$optim
adegpar("plabels.optim" = TRUE)

data(batcomm)
ab <- batcomm$ab
phy <- read.tree(text=batcomm$tre)
plot(phy, show.node=TRUE)
evoNSCAbat <- evoNSCA(phy, ab, scan=FALSE, nf=2)
evoNSCAbat$eig/sum(evoNSCAbat$eig)
s.label(evoNSCAbat$li)
s.label(evoNSCAbat$co)
s.arrow(evoNSCAbat$co)
inertia.dudi(evoNSCAbat, row=TRUE)$row.abs
inertia.dudi(evoNSCAbat, col=TRUE)$col.abs

evoNSCAbat <- evoNSCA(phy, ab, scan=FALSE, nf=3) ## All axes are now retained
# The Euclidean (canonical) distances among habitat points on the evoNSCA space is
dist(evoNSCAbat$li)
# which is equal to evoDprofile (see function evodiss):
evodiss(phy, ab, "LG")

adegpar("plabels.optim" = O)
}

## End(Not run)

[Package adiv version 2.1.1 Index]