Learn R Programming

picante (version 0.7-1)

pic3: Independent contrasts

Description

Modification of pic function from ape to return internal node values as well as contrasts and variance of contrasts.

Usage

pic3(x, phy, scaled = TRUE, var.contrasts = TRUE)

Arguments

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

Value

  • Matrix with three columns:
  • row.namesnode numbers
  • contrastsindependent contrast value
  • variancevariance of contrasts (sum of subtending branch lengths)
  • node.valsvalues calculated at internal nodes by contrast algorithm

Warning

Assumes that trait data are sorted in the same order as phylo$tip.label

References

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.

See Also

pic

Examples

Run this code
randtree <- rcoal(20)
randtraits <- evolve.brownian(randtree)
pic3(randtraits,randtree)

Run the code above in your browser using DataLab