APHYLO_DEFAULT_MCMC_CONTROL | R Documentation |
The function is a wrapper of fmcmc::MCMC()
.
APHYLO_DEFAULT_MCMC_CONTROL
aphylo_mcmc(
model,
params,
priors = uprior(),
control = list(),
check_informative = getOption("aphylo_informative", FALSE),
reduced_pseq = getOption("aphylo_reduce_pseq", TRUE)
)
APHYLO_PARAM_DEFAULT
model |
A model as specified in aphylo-model. |
params |
A vector of length 7 with initial parameters. In particular
|
priors |
A function to be used as prior for the model (see bprior). |
control |
A list with parameters for the optimization method (see details). |
check_informative |
Logical scalar. When |
reduced_pseq |
Logical. When |
An object of class list
of length 6.
An object of class numeric
of length 9.
APHYLO_DEFAULT_MCMC_CONTROL
lists the default values for the MCMC
estimation:
nsteps
: 1e4L
burnin
: 5e3L
thin
: 10L
nchains
: 2L
multicore
: FALSE
conv_checker
: fmcmc::convergence_auto(5e3)
For more information about the MCMC estimation process, see fmcmc::MCMC()
.
Methods base::print()
, base::summary()
, stats::coef, stats::window()
,
stats::vcov()
, stats::logLik()
, predict(),
and the various ways to query features of the trees via Ntip()
are available post estimation.
The vector APHYLO_PARAM_DEFAULT
lists the starting values for the parameters
in the model. The current defaults are:
psi0
: 0.10
psi1
: 0.05
mu_d0
: 0.90
mu_d1
: 0.50
mu_s0
: 0.10
mu_s1
: 0.05
eta0
: 1.00
eta1
: 1.00
Pi
: 0.50
An object of class aphylo_estimates.
Other parameter estimation:
aphylo_mle()
# Using the MCMC ------------------------------------------------------------
set.seed(1233)
# Simulating a tree
tree <- sim_tree(200)
# Simulating functions
atree <- raphylo(
tree = tree,
psi = c(.01, .03),
mu_d = c(.05, .02),
Pi = .5
)
# Running the MCMC
set.seed(1231)
ans_mcmc <- aphylo_mcmc(
atree ~ mu_d + psi + eta + Pi,
control = list(nsteps = 2e5, burnin=1000, thin=200)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.