Learn R Programming

pirouette (version 1.6.9)

is_best_candidate: Is the experiment the one with the most evidence?

Description

Is the experiment the one with the most evidence?

Usage

is_best_candidate(experiment, marg_liks)

Value

a boolean

Arguments

experiment

a pirouette experiment, as can be created by create_experiment

marg_liks

a data frame with marginal likelihoods/evidences. A test data frame can be created by create_test_marg_liks

Author

Richèl J.C. Bilderbeek

Examples

Run this code
if (beautier::is_on_ci()) {

  marg_liks <- create_test_marg_liks(
    site_models = list(beautier::create_jc69_site_model()),
    clock_models = list(beautier::create_strict_clock_model()),
    tree_priors = list(
      beautier::create_yule_tree_prior(),
      beautier::create_bd_tree_prior()
     )
  )

  marg_liks$weight <- c(0.9, 0.1) # in favor of Yule

  experiment_yule <- create_experiment(
    inference_model = beautier::create_inference_model(
      tree_prior = beautier::create_yule_tree_prior()
    )
  )
  create_experiment(
    inference_model = beautier::create_inference_model(
      tree_prior = beautier::create_bd_tree_prior()
    )
  )
}

Run the code above in your browser using DataLab