sample.congruence.class.posterior {CRABS} | R Documentation |
Stochastic exploration of congruent models for all samples in the posterior
Description
This function takes a posterior sample as input: a list of CRABS objects.
It will then iterate over the samples, and for each posterior sample it will
sample from the posterior class. It will sample using the sample.basic.models
function, and all additional parameters are passed to sample.basic.models
.
Usage
sample.congruence.class.posterior(
posterior,
num.samples,
rate.type = "extinction",
mu0.equal = FALSE,
rate0 = NULL,
...
)
Arguments
posterior |
a list of CRABS model objects |
num.samples |
The number of samples to be drawn |
rate.type |
either "extinction", "speciation", "both" or "joint" |
mu0.equal |
whether to propose alternative mu starting at mu0 equal to the posterior sample. default to FALSE |
rate0 |
rate0 allows the user to fix the extinction rate at the present to a single value. defaults to NULL, for drawing it randomly |
... |
Arguments passed on to
|
Value
A named list with congruent rates.
Examples
data(primates_ebd_log)
posterior <- read.RevBayes(primates_ebd_log, max_t = 65, n_samples = 10)
samples <- sample.congruence.class.posterior(posterior,
num.samples = 5,
rate.type = "extinction",
rate0.median = 0.1,
model = "MRF",
max.rate = 1.0)
print(samples)