Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

density.multiSimmap

Computes a posterior distribution for the number and types of changes on the tree


Description

This function summarizes the result of one or more stochastic maps.

Usage

## S3 method for class 'multiSimmap'
density(x, ...)
## S3 method for class 'changesMap'
plot(x, ...)

Arguments

x

object of class "multiSimmap" (see make.simmap), or, in the case plot.changesMap, an object of class "changesMap" produced via a call to density.multiSimmap.

...

optional arguments. For density.multiSimmap these consist of bw (bandwidth) & method ("changes", "densityMap", or "timings").

Details

In density.multiSimmap method="changes", the default, results in a posterior distribution of the number & types of changes on the tree. If the package coda has been installed, then the function HPD.interval is used to compute a 95-percent high probability density interval for the number of changes of each type on the tree. Otherwise, the central 95-percent of the posterior sample is returned as an estimate of the 95-percent HPD interval for each change type. The method also computes the full posterior density for each change type using a bandwidth specified by the user. method="densityMap" computes a standard "densityMap" object, and thus only permits binary characters. Finally method="changes" has not yet been implemented.

plot.changesMap plots the posterior density returned by density.multiSimmap for method= "changes".

Value

For method="changes" density.multiSimmap returns an object of class "changesMap".

For method="densityMap" density.multiSimmap returns an object of class "densityMap".

plot.changesMap generates a plot.

Author(s)

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.


phytools

Phylogenetic Tools for Comparative Biology (and Other Things)

v0.7-70
GPL (>= 2)
Authors
Liam J. Revell
Initial release
2020-9-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.