Learn R Programming

TreePar (version 2.1.2)

bd.densdep.optim: bd.densdep.optim: Estimating speciation and extinction rates in phylogenies under a density-dependent speciation model

Description

bd.densdep.optim estimates the maximum likelihood speciation and extinction rates under a density-dependent speciation model. Speciation rate is a function of the number of species N, lambda(N) = max(0,lambda(1-N/K)), and extinction rate is mu (constant).

Usage

bd.densdep.optim(x,minK,maxK,discrete=TRUE,continuous=FALSE,lambdainit=2,muinit=1,Kinit=0)

Arguments

x
Vector of speciation times in the phylogeny. Time is measured increasing going into the past with the present being time 0. x can be obtained from a phylogenetic tree using getx(TREE).
minK
Minimal value of K (when discrete=TRUE). Default is minK = (number of species).
maxK
Maximal value of K (when discrete=TRUE). Default is maxK = 1.5(number of species).
discrete
If discrete=TRUE, the likelihood function is maximized with K being an integer and the minimal size being minK and the maximal size being maxK.
continuous
If continuous=TRUE, the likelihood function is maximized with K being a continuous parameter. The function subplex is used for optimization and sometimes gets stuck at a non-optimal K. Thus I always recommend to also calculate with discrete=TRUE.
lambdainit
Initial lambda value for optimization when K is continuous (default is 2).
muinit
Initial mu value for optimization when K is continuous (default is 1).
Kinit
Initial K value for optimization when K is continuous (default is (number of species)+1).

Value

  • resMaximum likelihood speciation and extinction rate and the saturation value K; the first entry, res[[1]], is the result when K being discrete (0 if discrete=FALSE) and the second entry, res[[2]], is the result when K being continuous (0 if continuous=FALSE). $par is (lambda,mu,K). $value is -likelihood.

References

R.S. Etienne, B. Haegeman, T. Stadler, T. Aze, P.N. Pearson, A. Purvis and A.B. Phillimore: Diversity-dependence makes molecular phylogenies consistent with the fossil record. Submitted to Proc. Roy. Soc. B.