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)
tree
: phylogenetic treemean.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 sizesA list of regression drift tests performed in nodes with over 4 descendant tips.
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
DriftTest PlotTreeDriftTest
Diogo Melo
Useful links