Learn R Programming

DDD (version 1.9)

DDD-package: Diversity dependent diversification

Description

This package is a likelihood-based statistical package to estimate parameters under diversity-dependent diversification models. New in version 0.3: - Models with shifts in the parameters at a time tshift. New in version 0.4: - Bug fix of prefactor in likelihood - bug did not affect parameter estimates. - There is an option to condition or not on non-extinction of the phylogeny. - The functions dd_loglik and dd_SR_loglik now accept untransformed parameters; the transformation is done in the auxiliary functions. - Improved help pages. - Auxiliary functions no longer in help pages. New in version 1.0: - Another bug fix of prefactor in likelihood - bug did not affect parameter estimates. - Models with key innovations defined as decoupling of diversity-dependent dynamics. - Option to compute the likelihood of a set of branching times or of the phylogeny; these differ by a constant factor. New in version 1.1 - A model with diversity-dependence in speciation and extinction rate, currently only available for the likelihood without shifts or decoupling. New in version 1.2 - POssibility of automatically exploring multiple initial conditons for the SR models - Suppressing unnecessary output - Flushing computed likelihood values immediately (even with buffer on) - Bug fix in default value of the initial time of decoupling New in version 1.3 - Fix of default length of idparsopt - Fix of conversion problems for small branching times - Default initial parameter values in dd_ML based on birth-death model New in version 1.4 - Bug fix for when there is a large number of missing species New in version 1.5 - Bug fix for returned output of functions when there are fixed parameters. Textual output of DDD was correct. - Return to Nelder-Mead optimization for dd_ML (was set to "nlm" in versions 1.3 & 1.4) - New format for output off all ML-functions (dd_ML, dd_SR_ML, dd_KI_ML) New in version 1.6 (not on CRAN) - Bug fix in returned result when optimization does not converge. - Works also when only branching times are entered in ascending order (previously error was reported) New in version 1.7 - Cleaning up code, fixing various small bugs - New optimization algorithm because of occasional strange results with optim package New in version 1.8 - Bug fix for missing number of species in KI model - Bug fix for optimization of one parameter (due to R's inconsistent handling of matrices) - Model 5 (dd_ML and dd_loglik) now also allows values of -1 < r < 0; i.e. when extinction also decreases with diversity but less so than speciation New in version 1.9 - Bug fix in optimizer (did not stop when likelihood was positive) - Bug fix for large numbers of missing species - Conv = -1 is now always reported when optimization is not started or does not converge - An error is reported when parameter values cause numerical problems (NA or NaN) in likelihood computation, e.g. when parameter values are very high; loglik is then set to -Inf - For dd_KI_loglik and dd_KI_ML: if the number of missing species in main clade and subclade is known, this can now be specified - Fixing K at Inf is now possible in SR and KI models

Arguments

Details

ll{ Package: DDD Type: Package Version: 1.9 Date: 2012-11-29 License: GPL 2.0 } dd_loglik computes the likelihood of any of 4 different models of diversity-dependent diversification, given a set of parameters and a data set of phylogenetic branching times. dd_ML finds the parameters that maximizes the likelihood computed by dd_loglik. dd_SR_loglik is the same as dd_loglik except that it allows a shift in the parameters at time tshift. dd_SR_ML finds the parameters that maximizes the likelihood computed by dd_SR_loglik. dd_KI_loglik is the same as dd_loglik except that it allows decoupling of a subclade's dynamics from the main clade's dynamics potentially accompanied by a shift in parameters at time t_d. dd_KI_ML finds the parameters that maximizes the likelihood computed by dd_KI_loglik.

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, doi: 10.1086/667574

See Also

laser

Examples

Run this code
cat("Estimate the parameters of the diversity-dependent model")
cat("for a set of branching times with the default settings:")
brts = 1:20
dd_ML(brts)

cat("Estimating the parameters of the diversity-dependent model with shiftting rates")
cat("for a set of branching times brts with the default settings:")
brts = 1:20
dd_SR_ML(brts)

cat("Estimating the parameters of the diversity-dependent model with decoupling")
cat("for a set of branching times with the default settings:")
brtsM = 1:20
brtsS = seq(0.2,1.5,0.3)
tsplit = 5
dd_ML(brtsM,brtsS,tsplit)

Run the code above in your browser using DataLab