pmc | R Documentation |
Performs a phylogenetic monte carlo between modelA and modelB
pmc(
tree,
data,
modelA,
modelB,
nboot = 500,
optionsA = list(),
optionsB = list(),
...,
mc.cores = parallel::detectCores()
)
tree |
A phylogenetic tree. Can be phylo (ape) or ouch tree |
data |
The data matrix |
modelA |
a model from the list, or a custom model, see details |
modelB |
any other model from the list, or custom model, see details |
nboot |
number of bootstrap replicates to use |
optionsA |
additional arguments to modelA |
optionsB |
additional arguments to modelB |
... |
additional arguments to both fitting methods |
mc.cores |
number of parallel cores to use |
Simulates data under each model and returns the distribution of likelihood ratio, L(B)/L(A), under for both simulated datasets.
list with the nboot likelihood ratios obtained from fitting both models to data simulated by model A, and the nboot likelihood ratios obtained by fitting both models to simulations from model B, and the likelihood ratio between the original MLE estimated models from the data.
library("geiger")
geo=get(data(geospiza))
tmp=treedata(geo$phy, geo$dat)
phy=tmp$phy
dat=tmp$data[,1]
pmc(phy, dat, "BM", "lambda", nboot = 20, mc.cores=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.