plotRates: Extract and plot macroevolutionary rates from a CMR model...

Description Usage Arguments Value

View source: R/plotRates.R

Description

Extract and plot macroevolutionary rates from a CMR model fit.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plotRates(
  cmrfit,
  max_ma = NULL,
  stages = NULL,
  logax = T,
  draws = 250,
  quantiles = c(0.025, 0.5, 0.975),
  drawplot = TRUE,
  cladenames = NULL,
  lbs = NULL,
  ...
)

Arguments

cmrfit

A model fit, as output from MCMC_CMR

max_ma

(optional) a maximum age for the oldest interval, if not given assumed to be sum of all interval durations in cmrfit

stages

(optional) a data.frame of stages used for the analysis. Values max_ma,min_ma and colors are used to color the plot.

logax

(T/F), use log y-axis for plotting

draws

number of samples drawn from the MCMC chain (single number). Alternatively could be set of values indexing into the MCMC-chain.

drawplot

(T/F) if plot figure, defaults to TRUE.

qauntiles

gives the upper and lower quantiles for plotting bars around median, and the centre. Defaults to c(0.025,0.5,0.975).

Value

returns a list of three matrices with sampled rates; $SpecRates, $ExtRates and $SampRates.


josteist/Compadre documentation built on June 3, 2021, 1:02 p.m.