est_marg_lik | R Documentation |
Estimate the marginal likelihood for an inference model.
est_marg_lik(
fasta_filename,
inference_model = beautier::create_ns_inference_model(),
beast2_options = beastier::create_mcbette_beast2_options(),
os = rappdirs::app_dir()$os
)
fasta_filename |
name of the FASTA file |
inference_model |
an inference model, as can be created by create_inference_model |
beast2_options |
a |
os |
name of the operating system,
must be |
a list showing the estimated marginal likelihoods (and its estimated error), its items are::
marg_log_lik
: estimated marginal (natural) log likelihood
marg_log_lik_sd
: estimated error of marg_log_lik
esses
the Effective Sample Size
Richèl J.C. Bilderbeek
can_run_mcbette: see if 'mcbette' can run
est_marg_liks: estimate multiple marginal likelihoods
if (can_run_mcbette()) {
# An example FASTA file
fasta_filename <- system.file("extdata", "simple.fas", package = "mcbette")
# A testing inference model with inaccurate (thus fast) marginal
# likelihood estimation
inference_model <- beautier::create_ns_inference_model()
# Shorten the run, by doing a short (dirty, unreliable) MCMC
inference_model$mcmc <- beautier::create_test_ns_mcmc()
# Setup the options for BEAST2 to be able to call BEAST2 packages
beast2_options <- beastier::create_mcbette_beast2_options()
# Estimate the marginal likelihood
est_marg_lik(
fasta_filename = fasta_filename,
inference_model = inference_model,
beast2_options = beast2_options
)
beastier::remove_beaustier_folders()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.