DAMOCLES_ML {DAMOCLES} | R Documentation |
Maximization of the loglikelihood under the DAMOCLES model
Description
This function computes the maximum likelihood estimates of the parameters of the DAMOCLES model for a given phylogeny and presence-absence data. It also outputs the corresponding loglikelihood that can be used in model comparisons.
Usage
DAMOCLES_ML(
phy,
pa,
initparsopt,
idparsopt = 1:length(initparsopt),
parsfix = NULL,
idparsfix = NULL,
idparsequal = NULL,
pars2 = c(0.001, 1e-04, 1e-05, 1000),
optimmethod = "subplex",
pchoice = 0,
edgeTList = NULL,
methode = "analytical",
model = 0,
verbose = FALSE
)
Arguments
phy |
phylogeny in phylo format |
pa |
presence-absence table. |
initparsopt |
The initial values of the parameters that must be optimized |
idparsopt |
The ids of the parameters that must be optimized, e.g. 1:2
for extinction rate, and offset of immigration rate The ids are defined as
follows: |
parsfix |
The values of the parameters that should not be optimized. See idparsfix. |
idparsfix |
The ids of the parameters that should not be optimized, e.g. c(1,3) if mu and gamma_1 should not be optimized, but only gamma_0. In that case idparsopt must be c(2). The default is to fix all parameters not specified in idparsopt. |
idparsequal |
The ids of the parameters that should be set equal to the first parameter of the same type. |
pars2 |
Vector of settings: |
optimmethod |
Method used in optimization of the likelihood. Current default is 'subplex'. Alternative is 'simplex' (default of previous version) |
pchoice |
sets the p-value to optimize: |
edgeTList |
list of edge lengths that need to be succesively pruned; if not specified, it will computed using compute_edgeTList |
methode |
method used to solve the ODE. Either 'analytical' for the analytical solution, 'Matrix' for matrix exponentiation using package Matrix or 'expm' using package 'expm' or any of the numerical solvers, used in deSolve. |
model |
model used. Default is 0 (standard null model). Other options are 1 (binary traits) 2 (trinary environmental trait) or 3 (diversity-dependent colonization - beta version) |
verbose |
Whether intermediate output should be printed. Default is FALSE. |
Details
The output is a dataframe containing estimated parameters and maximum loglikelihood.
Value
mu |
gives the maximum likelihood estimate of mu |
gamma_0 |
gives the maximum likelihood estimate of gamma_0 |
gamma_1 |
gives the maximum likelihood estimate of gamma_1 |
loglik |
gives the maximum loglikelihood |
df |
gives the number of estimated parameters, i.e. degrees of feedom |
conv |
gives a message on convergence of optimization; conv = 0 means convergence |
Author(s)
Rampal S. Etienne
References
Pigot, A.L. & R.S. Etienne (2015). A new dynamic null model for phylogenetic community structure. Ecology Letters 18: 153-163.