pic3 {picante} | R Documentation |
Modification of pic function from ape to return internal node values as well as contrasts and variance of contrasts.
pic3(x, phy, scaled = TRUE, var.contrasts = TRUE)
x |
Trait vector (same order as phy$tip.label) |
phy |
phylo object |
scaled |
TRUE = standardize contrasts by branch lengths |
var.contrasts |
TRUE = return variance of contrasts |
Matrix with three columns:
row.names |
node numbers |
contrasts |
independent contrast value |
variance |
variance of contrasts (sum of subtending branch lengths) |
node.vals |
values calculated at internal nodes by contrast algorithm |
Assumes that trait data are sorted in the same order as phylo$tip.label
Original pic function by Emmanuel Paradis <Emmanuel.Paradis@mpl.ird.fr> modified to return node.vals by David Ackerly <dackerly@berkeley.edu>
Felsenstein J (1985) Phylogenies and the comparative method. American Naturalist 125: 1-15.
Garland T, Jr, Harvey PH & Ives AR (1992) Procedures for the analysis of comparative data using phylogenetically independent contrasts. Systematic Biology 41: 18-32.
randtree <- rcoal(20) randtraits <- evolve.brownian(randtree) pic3(randtraits,randtree)