Learn R Programming

DDD (version 1.9)

dd_loglik: Loglikelihood for diversity-dependent diversification models

Description

This function computes loglikelihood of a diversity-dependent diversification model for a given set of branching times and parameter values.

Usage

dd_loglik(pars1, pars2, brts, missnumspec)

Arguments

pars1
Vector of parameters: pars1[1] corresponds to lambda (speciation rate) before the shift pars1[2] corresponds to mu (extinction rate) before the shift pars1[3] corresponds to K (clade-level carrying capacity) befo
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
brts
A set of branching times of a phylogeny, all positive
missnumspec
The number of species that are in the clade but missing in the phylogeny

Value

  • The loglikelihood

References

Etienne et al. 2011, Proc. Roy. Soc. B, doi: 10.1098/rspb.2011.1439

See Also

dd_ML, dd_SR_loglik, dd_KI_loglik

Examples

Run this code
dd_loglik(pars1 = c(0.5,0.1,100), pars2 = c(100,1,TRUE,1), brts = 1:10, missnumspec = 0)

Run the code above in your browser using DataLab