summarize.posterior: Summarize trends in the posterior

Description Usage Arguments Value Examples

View source: R/summarize.posterior.R

Description

Summarize trends in the posterior

Usage

1
2
summarize.posterior(posterior, threshold = 0.01, rate_name = "lambda", 
return_data = FALSE, rm_singleton = FALSE, relative_deltas = FALSE)

Arguments

posterior

a list of ACDC objects, each one representing a sample from the posterior

threshold

a threshold for when Δ λ i should be interpreted as decreasing, flat, or increasing

rate_name

either "lambda" or "mu" or "delta"

return_data

instead of plots, return the plotting dataframes

rm_singleton

whether or not to remove singletons. Pass starting at present, going towards ancient

relative_deltas

whether to divide Δ λ i by the local lambda value

Value

a ggplot object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(primates_ebd_log)

posterior <- read.RevBayes(primates_ebd_log, max_t = 65, n_samples = 20)

samples <- sample.congruence.class.posterior(posterior, 
                                             num.samples = 20,
                                             rate.type = "extinction",
                                             rate0.median = 0.1,
                                             model = "MRF",
                                             max.rate = 1.0)

p <- summarize.posterior(samples, threshold = 0.05)

ACDC documentation built on Jan. 13, 2022, 1:08 a.m.