Loglikelihood for macro-evolutionary succession under diversity-dependent diversification with the key innovation at time t = t_d
dd_MS_loglik.RdThis function computes the loglikelihood of a diversity-dependent diversification model for a given set of branching times and parameter values where the diversity-dependent dynamics of an innovative subclade have different parameters from the dynamics of the main clade from time t_d, but both are governed by the same carrying capacity and experience each other's diversity.
Usage
dd_MS_loglik(
pars1,
pars2,
brtsM,
brtsS,
missnumspec,
methode = "odeint::runge_kutta_cash_karp54"
)Arguments
- pars1
Vector of parameters:
pars1[1]corresponds to lambda_M (speciation rate) of the main cladepars1[2]corresponds to mu_M (extinction rate) of the main cladepars1[3]corresponds to K_M (clade-level carrying capacity) of the main cladepars1[4]corresponds to lambda_M (speciation rate) of the subcladepars1[5]corresponds to mu_S (extinction rate) of the subcladepars1[6]corresponds to t_d (the time of the key innovation)- pars2
Vector of model settings:
pars2[1]sets the maximum number of species for which a probability must be computed. This must be larger than 1 + missnumspec + length(brts).pars2[2]sets the model of diversity-dependence:
-pars2[2] == 1linear dependence in speciation rate with parameter K (= diversity where speciation = extinction)
-pars2[2] == 1.3linear dependence in speciation rate with parameter K' (= diversity where speciation = 0)
-pars2[2] == 2exponential dependence in speciation rate with parameter K (= diversity where speciation = extinction)
-pars2[2] == 2.1variant of exponential dependence in speciation rate with offset at infinity
-pars2[2] == 2.21/n dependence in speciation rate
-pars2[2] == 2.3exponential dependence in speciation rate with parameter x (= exponent)
-pars2[2] == 3linear dependence in extinction rate
-pars2[2] == 4exponential dependence in extinction rate
-pars2[2] == 4.1variant of exponential dependence in extinction rate with offset at infinity
-pars2[2] == 4.21/n dependence in extinction ratepars2[3]sets the conditioning:
-pars2[3] == 0no conditioning
-pars2[3] == 1conditioning on non-extinction of the phylogenypars2[4]sets the time of splitting of the branch that will undergo the key innovation leading to different parameterspars2[5]sets the verbosity: 0 = no output, 1 = trace of the optimization only (no output from this function), 2 = parameters and loglikelihood shown on screen, 3 = as 2 plus messages about invalid parameter values and numerical problemspars2[6]sets whether the first data point is stem age (1) or crown age (2)pars2[7]sets whether the old (incorrect) likelihood should be used (0) or whether new corrected version should be used (1)- brtsM
A set of branching times of the main clade in the phylogeny, all positive
- brtsS
A set of branching times of the subclade in the phylogeny, all positive
- missnumspec
The number of species that are in the clade but missing in the phylogeny. One can specify the sum of the missing species in main clade and subclade or a vector c(missnumspec_M,missnumspec_S) with missing species in main clade and subclade respectively.
- methode
The method used to solve the master equation, default is 'analytical' which uses matrix exponentiation; alternatively numerical ODE solvers can be used, such as 'odeint::runge_kutta_cash_karp54'. These were used in the package before version 3.1.
References
- Etienne, R.S. et al. 2012, Proc. Roy. Soc. B 279: 1300-1309,
doi: 10.1098/rspb.2011.1439
- Etienne, R.S. & B. Haegeman 2012. Am. Nat.
180: E75-E89, doi: 10.1086/667574