Learn R Programming

ouxy (version 2.1)

sumstat: Summary statistics

Description

Calculate summary statistics given trait and tree

Usage

sumstat(trait = trait, tree = tree, ...)

Arguments

trait

A vector of numerical trait value

tree

An ape: tree object stored in phylo format

...

relevent argument

Value

Twelve summary statistcs: mean, sd, median, skewness, kurtosis from the raw data as well as from data with the difference between two closet neighbors, Bloomberg K and Pagel's lambda.

Details

This function computes the 12 summary statistics using the trait and tree. ape is used for computing the contrast trait from the difference between the species and its closet neighbor. For Bloomberg K and Pagel Lambda, statsitics are computed using phytools.

References

  1. Paradis E. & Schliep K. 2018. ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R. Bioinformatics 35: 526-528.

  2. Blomberg, Simon P., Theodore Garland Jr, and Anthony R. Ives. "Testing for phylogenetic signal in comparative data: behavioral traits are more labile." Evolution 57.4 (2003): 717-745.

  3. Pagel, Mark. "Inferring the historical patterns of biological evolution." Nature 401.6756 (1999): 877.

  4. Revell, Liam J. "phytools: an R package for phylogenetic comparative biology (and other things)." Methods in Ecology and Evolution 3.2 (2012): 217-223.

Examples

Run this code
# NOT RUN {
library(ape)
tree<-rcoal(5)
trait <- rnorm(5)
names(trait)<-tree$tip.label
sumstat(trait=trait,tree=tree)



# }

Run the code above in your browser using DataLab