Calls the mPTP MCMC engine directly via .Call(). Returns ML species
assignments plus per-node posterior support values.
Usage
mptp_mcmc(
tree,
method = c("multi", "single"),
mcmc_steps = 1000000L,
mcmc_sample = 1000L,
mcmc_burnin = 100000L,
mcmc_runs = 1L,
mcmc_credible = 0.95,
mcmc_startnull = FALSE,
mcmc_startrandom = FALSE,
mcmc_startml = FALSE,
outgroup = NULL,
outgroup_crop = FALSE,
pvalue = 0.001,
minbr = 1e-04,
seed = as.integer(Sys.time()),
quiet = FALSE
)Arguments
- tree
A path to a Newick tree file (character) or a
phyloobject from ape. Seemptpfor details.- method
Coalescent rate model:
"multi"(default) or"single".- mcmc_steps
Integer. Total MCMC steps per run (default 1,000,000).
- mcmc_sample
Integer. Sampling frequency (default 1,000).
- mcmc_burnin
Integer. Steps discarded as burn-in (default 100,000).
- mcmc_runs
Integer. Number of independent runs (default 1).
- mcmc_credible
Numeric. Credible interval (default 0.95).
- mcmc_startnull
Logical. Start from the null (one-species) model.
- mcmc_startrandom
Logical. Start from a random delimitation.
- mcmc_startml
Logical. Start from the ML delimitation.
- outgroup
Character. Outgroup taxon name for rooting (optional).
- outgroup_crop
Logical. Remove outgroup after rooting (default
FALSE).- pvalue
Numeric. LRT significance threshold (default 0.001).
- minbr
Numeric. Minimum branch length threshold (default 0.0001).
- seed
Integer. Random seed (default: current time).
- quiet
Logical. Suppress C-level progress messages (default
FALSE).
Value
An object of classes c("mptp_mcmc", "mptp_ml"), a list with
all fields of "mptp_ml" plus:
supportData frame with columns
node_labelandsupport(0–1); posterior probability of each inner node being a coalescent root.mcmc_stepsInteger.
mcmc_sampleInteger.
mcmc_burninInteger.
mcmc_runsInteger.
seedInteger. Actual seed used.