collapsed.intervals

From ape v2.1-1
0th

Percentile

Collapsed Coalescent Intervals

This function takes a "coalescentIntervals" objects and collapses neighbouring coalescent intervals into a single combined interval so that every collapsed interval is larger than epsilon. Collapsed coalescent intervals are used, e.g., to obtain the generalized skyline plot (skyline). For epsilon = 0 no interval is collapsed.

Keywords
manip
Usage
collapsed.intervals(ci, epsilon=0)
Arguments
ci
coalescent intervals (i.e. an object of class "coalescentIntervals").
epsilon
collapsing parameter that controls the amount of smoothing (allowed range: from 0 to ci$total.depth) Details Proceeding from the tips to the root of the tree each small interval is pooled with the neighboring interval closer to the root. If the neighboring interval is also small, then pooling continues until the composite interval is larger than epsilon. Note that this approach prevents the occurrence of zero-length intervals at the present. For more details see Strimmer and Pybus (2001). Value • An object of class "collapsedIntervals" with the following entries: • lineagesA vector with the number of lineages at the start of each coalescent interval. • interval.lengthA vector with the length of each coalescent interval. • collapsed.intervalA vector indicating for each coalescent interval to which collapsed interval it belongs. • interval.countThe total number of coalescent intervals. • collapsed.interval.countThe number of collapsed intervals. • total.depthThe sum of the lengths of all coalescent intervals. • epsilonThe value of the underlying smoothing parameter. References Strimmer, K. and Pybus, O. G. (2001) Exploring the demographic history of DNA sequences using the generalized skyline plot. Molecular Biology and Evolution, 18, 2298--2305. See Also coalescent.intervals,skyline. Aliases • collapsed.intervals Examples data("hivtree.table") # example tree # colescent intervals from vector of interval lengths ci <- coalescent.intervals(hivtree.table$size)
ci

# collapsed intervals
cl1 <- collapsed.intervals(ci,0)
cl2 <- collapsed.intervals(ci,0.0119)

cl1
cl2
Documentation reproduced from package ape, version 2.1-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.