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

View source: R/is_best_candidate.R

is_best_candidateR Documentation

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)

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

Value

a boolean

Author(s)

Richèl J.C. Bilderbeek

Examples

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()
    )
  )
}

richelbilderbeek/pirouette documentation built on Oct. 18, 2023, 3:09 p.m.