Learn R Programming

DDD (version 1.4)

dd_KI_loglik: Loglikelihood for diversity-dependent diversification models with decoupling of a subclade from a main clade at time t = t_d

Description

This function computes loglikelihood of a diversity-dependent diversification model for a given set of branching times and parameter values where the diversity-dependent dynamics of a subclade decouple from the dynamics of the main clade at time t_d, potentially accompanied by a shift in parameters.

Usage

dd_KI_loglik(pars1, pars2, brtsM, brtsS, missnumspec)

Arguments

pars1
Vector of parameters: pars1[1] corresponds to lambda_M (speciation rate) of the main clade pars1[2] corresponds to mu_M (extinction rate) of the main clade pars1[3] corresponds to K_M (clade-level carrying capaci
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 + length(brts). pars2[2] sets the model of diversity-dependence: - pars2[2
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 missing in the phylogeny

Value

  • The loglikelihood

References

- Etienne et al. 2012. Proc. Roy. Soc. B 279: 1300-1309, doi: 10.1098/rspb.2011.1439 - Etienne & Haegeman 2012. Am. Nat. In press.

See Also

dd_KI_ML, dd_loglik dd_SR_loglik

Examples

Run this code
pars1 = c(0.25,0.12,25.51,1.0,0.16,8.61,9.8)
pars2 = c(200,1,TRUE,18.8)
missnumspec = 0
brtsM = c(25.2,24.6,24.0,22.5,21.7,20.4,19.9,19.7,18.8,17.1,15.8,11.8,9.7,8.9,5.7,5.2)
brtsS = c(9.6,8.6,7.4,4.9,2.5)
dd_KI_loglik(pars1,pars2,brtsM,brtsS,missnumspec)

Run the code above in your browser using DataLab