variance.phylog {ade4} | R Documentation |
The phylogenetic ANOVA
Description
This function performs the variance analysis of a trait on eigenvectors associated to a phylogenetic tree.
Usage
variance.phylog(phylog, z, bynames = TRUE,
na.action = c("fail", "mean"))
Arguments
phylog |
: an object of class |
z |
: a numeric vector of the values corresponding to the variable |
bynames |
: if TRUE checks if |
na.action |
: if 'fail' stops the execution of the current expression when |
Details
phylog$Amat
defines a set of orthonormal vectors associated the each nodes of the phylogenetic tree.
phylog$Adim
defines the dimension of the subspace A defined by
the first phylog$Adim
vectors of phylog$Amat
that corresponds to phylogenetic inertia.
variance.phylog
performs the linear regression of z
on A.
Value
Returns a list containing
lm |
: an object of class |
anova |
: an object of class |
smry |
: an object of class |
Author(s)
Sébastien Ollier sebastien.ollier@u-psud.fr
Daniel Chessel
References
Grafen, A. (1989) The phylogenetic regression. Philosophical Transactions of the Royal Society London B, 326, 119–156.
Diniz-Filho, J. A. F., Sant'Ana, C.E.R. and Bini, L.M. (1998) An eigenvector method for estimating phylogenetic inertia. Evolution, 52, 1247–1262.
See Also
Examples
data(njplot)
njplot.phy <- newick2phylog(njplot$tre)
variance.phylog(njplot.phy,njplot$tauxcg)
par(mfrow = c(1,2))
table.phylog(njplot.phy$Ascores, njplot.phy, clabel.row = 0,
clabel.col = 0.1, clabel.nod = 0.6, csize = 1)
dotchart.phylog(njplot.phy, njplot$tauxcg, clabel.nodes = 0.6)
if (requireNamespace("adephylo", quietly = TRUE) & requireNamespace("ape", quietly = TRUE)) {
tre <- ape::read.tree(text = njplot$tre)
adephylo::orthogram(njplot$tauxcg, tre = tre)
}