Estimate maximum shift credibility configuration

Share:

Description

This is one estimate of the "best" rate shift configuration, considering only those shift configurations that were actually sampled using BAMM's reversible jump MCMC simulator. This is analogous to the "maximum clade credibility tree" from a Bayesian phylogenetic analysis. It is not necessarily the same as the shift configuration with the maximum a posteriori probability.

Usage

1
maximumShiftCredibility(ephy, maximize = "product")

Arguments

ephy

An object of class BAMMdata.

maximize

Maximize the marginal probability of the product or sum of branch-specific shifts.

Details

This is one point estimate of the overall "best" rate shift configuration. Following an MCMC simulation, the marginal shift probabilities on each individual branch are computed using marginalShiftProbsTree. The shift configuration that maximizes the product (or sum, if specified) of these marginal branch-specific shift probabilities is the maximum shift credibility configuration.

This option is only recommended if you have no clear "winner" in your credible set of shift configurations (see credibleShiftSet). If you have a number of largely-equiprobable shift configurations in your 95% credible set, you may wish to try this function as an alternative for identifying a single best shift configuration. Otherwise, it is recommended that you present the shift configuration with the maximum a posteriori probability (see getBestShiftConfiguration).

Value

A list with the following components:

  • bestconfigs A vector of the index values of MCMC samples with shift configurations equal to the maximum. Usually, more than one state sampled during the MCMC simulation will have an identical (maximized) marginal probability. All samples given in this vector will have an identical shift configuration.

  • scores The optimality score (product or sum of marginal shift probabilities) for all sampled shift configurations in the BAMMdata object.

  • optimalityType Whether the product or sum of marginal shift probabilities was used to compute the maximum shift credibility configuration.

  • sampleindex A representative sample that is equal to the maximum shift credibility configuration (e.g., this can be plotted with addBAMMshifts).

Author(s)

Dan Rabosky

See Also

marginalShiftProbsTree, addBAMMshifts, cumulativeShiftProbsTree, credibleShiftSet, getBestShiftConfiguration

Examples

1
2
3
4
5
data(whales, events.whales)
ed <- getEventData(whales, events.whales, burnin=0.25, nsamples=500)
best_config <- maximumShiftCredibility(ed)
plot(ed)
addBAMMshifts(ed, method='phylogram', index=best_config$sampleindex)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.