DAISIE_loglik_integrand: Integrand to be integrated to calculate the log likelihood...

View source: R/DAISIE_loglik_integrate.R

DAISIE_loglik_integrandR Documentation

Integrand to be integrated to calculate the log likelihood for the relaxed rate model.

Description

Integrand to be integrated to calculate the log likelihood for the relaxed rate model.

Usage

DAISIE_loglik_integrand(
  DAISIE_par,
  pars1,
  pars2,
  brts,
  stac,
  missnumspec,
  methode,
  abstolint,
  reltolint,
  verbose,
  pick,
  par_mean,
  par_sd
)

Arguments

DAISIE_par

A numeric parameter to evaluate the integral of the function.

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

methode

Method of the ODE-solver. Supported Boost ODEINT solvers (steppers) are: "odeint::runge_kutta_cash_karp54" "odeint::runge_kutta_fehlberg78" "odeint::runge_kutta_dopri5" "odeint::bulirsch_stoer" without odeint::-prefix, deSolve{ode} method is assumed. The default method overall is "lsodes" for DAISIE_ML_CS() and "ode45" from ode() for DAISIE_ML_IW().

abstolint

Numeric absolute tolerance of the integration

reltolint

Numeric relative tolerance of the integration

verbose

A numeric vector of length 1, which in simulations and 'DAISIEdataprep()' can be '1' or '0', where '1' gives intermediate output should be printed. For ML functions a numeric determining if intermediate output should be printed. The default: '0' does not print, '1' prints the initial likelihood and the settings that were selected (which parameters are to be optimised, fixed or shifted), '2' prints the same as '1 and also the intermediate output of the parameters and loglikelihood, while '3' the same as '2' and prints intermediate progress during likelihood computation.

pick

Numeric determining which parameter is selected for the relaxed-rate model

Value

A numeric


DAISIE documentation built on Oct. 22, 2023, 1:06 a.m.