1 \name{collapsed.intervals}
2 \alias{collapsed.intervals}
4 \title{Collapsed Coalescent Intervals}
6 collapsed.intervals(ci, epsilon=0)
9 \item{ci}{coalescent intervals (i.e. an object of class \code{"coalescentIntervals"}).}
10 \item{epsilon}{collapsing parameter that controls the amount of smoothing
11 (allowed range: from \code{0} to \code{ci$total.depth})}
14 This function takes a \code{"coalescentIntervals"} objects and collapses neighbouring
15 coalescent intervals into a single combined interval so that every collapsed interval is
16 larger than \code{epsilon}. Collapsed coalescent intervals are used, e.g., to obtain the
17 generalized skyline plot (\code{\link{skyline}}). For \code{epsilon = 0} no interval
21 Proceeding from the tips to the root of the tree each small
22 interval is pooled with the neighboring interval closer to the root. If the
23 neighboring interval is also small, then pooling continues until the composite
24 interval is larger than \code{epsilon}. Note that this approach prevents the
25 occurrence of zero-length intervals at the present.
26 For more details see Strimmer and Pybus (2001).
30 An object of class \code{"collapsedIntervals"} with the following entries:
32 \item{lineages}{ A vector with the number of lineages at the start of each coalescent
34 \item{interval.length}{ A vector with the length of each coalescent
36 \item{collapsed.interval}{A vector indicating for each coalescent interval to which
37 collapsed interval it belongs.}
38 \item{interval.count}{ The total number of coalescent
40 \item{collapsed.interval.count}{The number of collapsed intervals.}
41 \item{total.depth}{ The sum of the lengths of all coalescent
43 \item{epsilon}{The value of the underlying smoothing parameter.}
46 \author{Korbinian Strimmer (\url{http://www.stat.uni-muenchen.de/~strimmer/})}
49 \code{\link{coalescent.intervals}},\code{\link{skyline}}.
54 Strimmer, K. and Pybus, O. G. (2001) Exploring the demographic history
55 of DNA sequences using the generalized skyline plot. \emph{Molecular
56 Biology and Evolution}, \bold{18}, 2298--2305.
60 data("hivtree.table") # example tree
62 # colescent intervals from vector of interval lengths
63 ci <- coalescent.intervals(hivtree.table$size)
67 cl1 <- collapsed.intervals(ci,0)
68 cl2 <- collapsed.intervals(ci,0.0119)