dd_MS_ML( brtsM, brtsS, tsplit, initparsopt = c(0.5, 0.1, 2 * (1 + length(brtsM) + length(brtsS) + sum(missnumspec)),
(tsplit + max(brtsS))/2), parsfix = NULL, idparsopt = c(1:3, 6), idparsfix = NULL, idparsnoshift = (1:6)[c(-idparsopt, (-1)^(length(idparsfix) != 0) * idparsfix)], res = 10 * (1 + length(c(brtsM, brtsS)) + sum(missnumspec)), ddmodel = 1.3, missnumspec = 0, cond = 0, soc = 2, tol = c(1E-3,1E-4,1E-6), maxiter = 1000 * round((1.25)^length(idparsopt)), changeloglikifnoconv = FALSE, optimmethod = 'subplex', methode = 'analytical' )
ddmodel == 1
: linear dependence in speciation rate with parameter K (= diversity where speciation = extinction)
ddmodel == 1.3
: linear dependence in speciation rate with parameter K' (= diversity where speciation = 0)
ddmodel == 2
: exponential dependence in speciation rate with parameter K (= diversity where speciation = extinction)
ddmodel == 2.1
: variant of exponential dependence in speciation rate with offset at infinity
ddmodel == 2.2
: 1/n dependence in speciation rate
ddmodel == 2.3
: exponential dependence in speciation rate with parameter x (= exponent)
ddmodel == 3
: linear dependence in extinction rate
ddmodel == 4
: exponential dependence in extinction rate
ddmodel == 4.1
: variant of exponential dependence in extinction rate with offset at infinity
ddmodel == 4.2
: 1/n dependence in extinction rate with offset at infinity
dd_MS_loglik
,
dd_ML
,
dd_KI_ML
,
dd_SR_ML
,
cat("This will estimate parameters for two sets of branching times brtsM, brtsS\n")
cat("without conditioning.\n")
cat("The tolerance of the optimization is set high so runtime is fast in this example.\n")
cat("In real applications, use the default or more stringent settins for tol.\n")
brtsM = 4:10
brtsS = seq(0.1,3.5,0.7)
tsplit = 5
dd_MS_ML(brtsM = brtsM, brtsS = brtsS, tsplit = tsplit, idparsopt = c(1:3,6),
initparsopt = c(0.885, 2e-14, 10, 4.001), idparsfix = NULL, parsfix = NULL,
idparsnoshift = c(4,5), cond = 0, tol = c(3E-1,3E-1,3E-1))
Run the code above in your browser using DataLab