"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.collapsed.intervals(ci, epsilon=0)
"coalescentIntervals"
).0
to ci$total.depth
)"collapsedIntervals"
with the following entries:epsilon
. Note that this approach prevents the
occurrence of zero-length intervals at the present.
For more details see Strimmer and Pybus (2001).coalescent.intervals
,skyline
.library(ape)
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
Run the code above in your browser using DataLab