emphasis: Emphasis main function

View source: R/emphasis.R

emphasisR Documentation

Emphasis main function

Description

Main function of emphasis, that uses an E-M approach to fit a diversification model to a phylogenetic tree.

Usage

emphasis(
  phylo,
  brts = NULL,
  model,
  lower_bound = numeric(0),
  upper_bound = numeric(0),
  max_lambda = 500,
  xtol = 0.001,
  em_tol = 0.25,
  sample_size_tol = 0.005,
  verbose = TRUE,
  return_trees = FALSE,
  max_missing = 10000,
  burnin_sample_size = 200,
  pilot_sample_size = seq(100, 1000, by = 100),
  burnin_iterations = 20,
  num_threads = 0,
  conditional = NULL
)

Arguments

brts

vector of branching times of the tree for which the model has to be fitted

model

model to be used

lower_bound

vector of the lower limit of parameter values used by the model. Set to -Infinity if left empty.

upper_bound

vector of the upper limit of parameter values used by the model. Set to +Infinity if left empty

max_lambda

maximum speciation rate, default is 500. Should not be set too high to avoid extremely long run times

xtol

tolerance of step size in the M step

em_tol

tolerance of step size in cycling through EM

sample_size_tol

tolerance in determining the sample size

verbose

if TRUE, provides textual output of intermediate steps

return_trees

boolean, if TRUE the simulated trees are returned as well

max_missing

maximum number of tips a tree can be augmented with.

burnin_sample_size

sample size during burn-in

pilot_sample_size

vector of sample sizes used to determine the true sampling size

burnin_iterations

number of iterations of the EM algorithm to discard as burn-in

num_threads

number of threads to be used. If set to 0, the maximum number of threads available is chosen.

conditional

a function that takes a parameter set as argument and returns conditional probability.

soc

number of species at the root (1) or crown (2). Default is 2.

Value

a list with two components: 1) pars contains the average parameter estimate and 2) MCEM matrix of parameter estimates and likelihoods.


franciscorichter/emphasis documentation built on Feb. 19, 2024, 7:36 p.m.