TreeDriftTest function

Drift test along phylogeny

Drift test along phylogeny

Performs a regression drift test along a phylogeny using DriftTest function.

TreeDriftTest(tree, mean.list, cov.matrix.list, sample.sizes = NULL)

Arguments

  • tree: phylogenetic tree
  • mean.list: list of tip node means. Names must match tip node labels.
  • cov.matrix.list: list of tip node covariance matrices. Names must match tip node labels.
  • sample.sizes: vector of tip nodes sample sizes

Returns

A list of regression drift tests performed in nodes with over 4 descendant tips.

Examples

library(ape) data(bird.orders) tree <- bird.orders mean.list <- llply(tree$tip.label, function(x) rnorm(5)) names(mean.list) <- tree$tip.label cov.matrix.list <- RandomMatrix(5, length(tree$tip.label)) names(cov.matrix.list) <- tree$tip.label sample.sizes <- runif(length(tree$tip.label), 15, 20) test.list <- TreeDriftTest(tree, mean.list, cov.matrix.list, sample.sizes) #Ancestral node plot: test.list[[length(test.list)]]$plot

See Also

DriftTest PlotTreeDriftTest

Author(s)

Diogo Melo

  • Maintainer: Diogo Melo
  • License: MIT + file LICENSE
  • Last published: 2023-12-05

Useful links