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 `phylog`
`z` | : a numeric vector of the values corresponding to the variable
`bynames` | : if TRUE checks if `z` labels are the same as `phylog` leaves label, possibly in a different order. If FALSE the check is not made and `z` labels must be in the same order than `phylog` leaves label
`na.action` | : if 'fail' stops the execution of the current expression when `z` contains any missing value. If 'mean' replaces any missing values by mean(`z`)

### 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 `lm` that corresponds to the linear regression of `z` on A.
`anova` | : an object of class `anova` that corresponds to the anova of the precedent model.
`smry` | : an object of class `anova` that is a summary of the precedent object.

### 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

`phylog`, `lm`

### 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)
    }

[Package ade4 version 1.7-13 Index]