getShiftNodesFromIndex {BAMMtools} | R Documentation |
Identify nodes associated with rate shifts from bammdata
object
Description
Find the node numbers associated with rate shifts for a
specified sample from the posterior distribution contained in a
bammdata
object.
Usage
getShiftNodesFromIndex(ephy, index)
Arguments
ephy |
A |
index |
The index value of the posterior sample from which you want
to identify shift nodes. This is not the same as the actual
generation number of the MCMC sample. If your |
Value
A vector of nodes (excluding the root) that define branches on which shifts occurred for the specified sample from the posterior. Will return a numeric of length 0 if no non-root shifts occur in the specified sample.
Author(s)
Dan Rabosky
See Also
addBAMMshifts
, plot.bammdata
,
maximumShiftCredibility
Examples
data(whales, events.whales)
ed <- getEventData(whales, events.whales, burnin=0.1, nsamples=500)
# Get the maximum shift credibility configuration:
msc <- maximumShiftCredibility(ed)
# Get the nodes at which shifts occurred in the
# maximum shift credibility configuration:
getShiftNodesFromIndex(ed, index=msc$sampleindex)
[Package BAMMtools version 2.1.11 Index]