Learn R Programming

evolqg (version 0.2-2)

TreeDriftTest: Drift test along phylogeny

Description

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

Usage

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

Value

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

See Also

DriftTest PlotTreeDriftTest

Examples

Run this code
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

Run the code above in your browser using DataLab