Description Usage Arguments Details Value Author(s) References See Also Examples
The function proxTips
computes a given proximity between a set
of tips of a phylogeny. A vector of tips is supplied: proximities
between all possible pairs of these tips are computed.
The proximities are computed from the shortest path
between the tips.
Proximities are computed as the inverse (to the power a
) of a
phylogenetic distance (computed by distTips
. Denoting
D=[d_{ij}] a matrix of phylogenetic distances, the proximity matrix M=[m_{ij}] is
computed as:
m_{ij} = (1/d_{ij})^a for all i different from j
and
m_{ii} = 0
Several distances can be used, defaulting to the
sum of branch lengths (see argument method
).
Proximities are not true similarity measures, since the proximity of a tip with
itself is always set to zero.
The obtained matrix of phylogenetic proximities (M) defines a bilinear
symmetric form when M is symmetric (default):
f(x,y) = x^{T}My
In general, M is not a metric because it is not positive-definite. Such a matrice can be used to measure phylogenetic autocorrelation (using Moran's index):
I(x) = (x^{T}Mx)/(var(x))
or to compute lag vectors (Mx) used in autoregressive models, like:
x = Mx + ... + e
where '...' is the non-autoregressive part of the model, and 'e' are residuals.
1 2 |
x |
a tree of class |
tips |
A vector of integers identifying tips by their numbers, or a vector of characters identifying tips by their names. Distances will be computed between all possible pairs of tips. |
method |
a character string (full or abbreviated without
ambiguity) specifying the method used to compute proximities;
possible values are: |
a |
the exponent used to compute the proximity |
normalize |
a character string specifying whether the matrix must
be normalized by row ( |
symmetric |
a logical stating whether M must be coerced to be symmetric (TRUE, default) or not. This is achieved by taking (denoting N the matrix of proximities before re-symmetrization): M = 0.5 * (N + N^{T}) Note that x^{T}Ny = x^{T}My, but the latter has the advantage of using a bilinear symmetric form (more appropriate for optimization purposes). |
useC |
a logical indicating whether computations of distances (before transformation into proximities) should be performed using compiled C code (TRUE, default), or using a pure R version (FALSE). C version is several orders of magnitude faster, and R version is kept for backward compatibility. |
Abouheif
proximity refers to the phylogenetic proximity
underlying the test of Abouheif (see references). Let P be the set of
all the nodes in the path going from node1
to node2
. Let
DDP be the number of direct descendants from each node in P. Then, the
so-called 'Abouheif' distance is the inverse of the product of all
terms in DDP. oriAbouheif
returns a matrix with non-null diagonal
elements, as formulated in Pavoine et al. (2008). This matrix is
bistochastic (all marginal sums equal 1), but this bilinear
symmetric form does not give rise to a Moran's index, since it
requires a null diagonal. Abouheif
contains Abouheif's
proximities but has a null diagonal, giving rise to a Moran's index.
sumDD
refers to a phylogenetic proximity quite similar to that
of Abouheif. We consider the same sets P and DDP. But instead of
taking the inverse of the product of all terms in DDP, this proximity
computes the inverse of the sum of all terms in DDP. This matrix was
denoted 'M' in Pavoine et al. (2008), who reported that it is
related to May's index (May, 1990).
A matrix of phylogenetic proximities.
Thibaut Jombart tjombart@imperial.ac.uk
== About Moran's index with various proximities ==
Pavoine, S.; Ollier, S.; Pontier, D.; Chessel, D. (2008) Testing for
phylogenetic signal in life history variable: Abouheif's test
revisited. Theoretical Population Biology: 73, 79-91.
== About regression on phylogenetic lag vector ==
Cheverud, J. M.; Dow, M. M.; Leutenegger, W. (1985) The quantitative
assessment of phylogentic constaints in comparative analyses: sexual
dimorphism in body weights among primates. Evolution 39,
1335-1351.
Cheverud, J. M.; Dow, M. M. (1985) An autocorrelation analysis of genetic
variation due to lineal fission in social groups of Rhesus macaques.
American Journal of Phyisical Anthropology 67,
113-121.
== Abouheif's original paper ==
Abouheif, E. (1999) A method for testing the assumption of
phylogenetic independence in comparative data. Evolutionary Ecology
Research, 1, 895-909.
== May's index ==
May, R.M. (1990) Taxonomy as destiny. Nature 347, 129-130.
distTips
which computes several phylogenetic
distances between tips.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | if(require(ape) & require(phylobase)){
## make a tree
x <- as(rtree(10),"phylo4")
plot(x, show.node=TRUE)
axisPhylo()
## compute different distances
proxTips(x, 1:5)
proxTips(x, 1:5, "nNodes")
proxTips(x, 1:5, "Abouheif")
proxTips(x, , "sumDD")
## see what one proximity looks like
M <- proxTips(x)
obj <- phylo4d(x,as.data.frame(M))
table.phylo4d(obj,symbol="sq")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.