DAISIE_loglik_integrate: Integrates the loglikelihood of a single clade across a...

Description Usage Arguments Value

View source: R/DAISIE_loglik_integrate.R

Description

Integrates the loglikelihood of a single clade across a parameter weighted by a given distribution

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
DAISIE_loglik_integrate(
  pars1,
  pars2,
  brts,
  stac,
  missnumspec,
  CS_version,
  methode,
  abstolint,
  reltolint,
  verbose
)

Arguments

pars1

Vector of model parameters:

pars1[1] corresponds to lambda^c (cladogenesis rate)
pars1[2] corresponds to mu (extinction rate)
pars1[3] corresponds to K (clade-level carrying capacity)
pars1[4] corresponds to gamma (immigration rate)
pars1[5] corresponds to lambda^a (anagenesis rate).

pars2

Vector of settings:

pars2[1] corresponds to res, the maximum number of endemics or non-endemics for which the ODE system is solved; this must be much larger than the actual number for which the probability needs to be calculated.)
pars2[2] corresponds to M, size of the mainland pool, i.e the number of species that can potentially colonize the island.

brts

Numeric vector of branching times

stac

Numeric of Endemicity status

missnumspec

Numeric of missing species

CS_version

a numeric or list. Default is 1 for the standard DAISIE model, for a relaxed-rate model a list with the following elements:

  • model: the CS model to run, options are 1 for single rate DAISIE model, 2 for multi-rate DAISIE, or 0 for IW test model

  • relaxed_par: the parameter to relax (integrate over). Options are "cladogenesis", "extinction", "carrying_capacity", "immigration", or "anagenesis"

methode

Method of the ODE-solver. See package deSolve for details. Default is "lsodes".

abstolint

Numeric absolute tolerance of the integration

reltolint

Numeric relative tolerance of the integration

verbose

In simulation and dataprep functions a logical, Default = TRUE gives intermediate output should be printed. For ML functions a numeric determining if intermediate output should be printed, Default = 0 does not print, verbose = 1 prints intermediate output of the parameters and loglikelihood, verbose = 2 means also intermediate progress during loglikelihood computation is shown.

Value

A loglikelihood value


DAISIE documentation built on Aug. 26, 2020, 5:12 p.m.