Description Usage Arguments Details Value Author(s) References See Also
View source: R/DAMOCLES_bootstrap.R
This function computes the maximum likelihood estimates of colonisation and local extinction rate for a given phylogeny and presence-absence data under the DAMOCLES model. These rate estimates are used to simulate null communities under the DAMOCLES model. Standardized effect size of mean nearest taxon distance (mntd), mean phylogentic distance (mpd) and loglikelihood are calculated For comparison, standardised effect sizes are also calculated relative to a "Random-Draw" null model i.e. presence absence randomised across tips
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | DAMOCLES_bootstrap(
phy = ape::rcoal(10),
pa = matrix(c(phy$tip.label, sample(c(0, 1), ape::Ntip(phy), replace = T)), nrow =
ape::Ntip(phy), ncol = 2),
initparsopt = c(0.1, 0.1),
idparsopt = 1:length(initparsopt),
parsfix = NULL,
idparsfix = NULL,
pars2 = c(0.001, 1e-04, 1e-05, 1000),
pchoice = 0,
runs = 999,
estimate_pars = FALSE,
conf.int = 0.95
)
|
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) if mu should not be optimized, but only gamma_0. In that case idparsopt must be c(2). The default is to fix the parameters not specified in idparsopt. |
pars2 |
Vector of settings: |
pchoice |
sets which p-value to optimize and with which root state to
simulate (default pchoice = 0) |
runs |
the number null communities to generate. |
estimate_pars |
Whether to estimate parameters on the simulated datasets (default = FALSE). |
conf.int |
The width of the conifdence intervals calculated on bootstrapped parameter estimates |
The output is a list of two dataframes. The first dataframe, summary_table, contains the summary results. The second dataframe, null_community_data, contains decsriptive statistics for each null community.
summary_table |
|
null_community_data |
|
Rampal S. Etienne
Pigot, A.L. & R.S. Etienne (2015). A new dynamic null model for phylogenetic community structure. Ecology Letters 18: 153-163.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.