View source: R/getShiftNodesFromIndex.R
getShiftNodesFromIndex | R Documentation |
bammdata
objectFind the node numbers associated with rate shifts for a
specified sample from the posterior distribution contained in a
bammdata
object.
getShiftNodesFromIndex(ephy, index)
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 |
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.
Dan Rabosky
addBAMMshifts
, plot.bammdata
,
maximumShiftCredibility
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.