create_mean_param: Create a parameter called mean

create_mean_paramR Documentation

Create a parameter called mean

Description

Create a parameter called mean

Usage

create_mean_param(id = NA, value = 0)

Arguments

id

the parameter's ID

value

value of the parameter

Value

a parameter called mean

Note

this parameter is used in an exponential distribution (as returned by create_exp_distr) and normal distribution (as returned by create_normal_distr). It cannot be estimated (as a hyper parameter) yet.

Author(s)

Richèl J.C. Bilderbeek

See Also

the function create_param contains a list of all parameters that can be created

Examples

if (is_on_ci()) {

  # Create the parameter
  mean_param <- create_mean_param(value = 1.0)

  # Use the parameter in a distribution
  exp_distr <- create_exp_distr(
    mean = mean_param
  )

  # Use the distribution to create a BEAST2 input file
  beast2_input_file <- get_beautier_tempfilename()
  create_beast2_input_file(
    input_filename = get_fasta_filename(),
    beast2_input_file,
    tree_prior = create_yule_tree_prior(
      birth_rate_distr = exp_distr
    )
  )
  file.remove(beast2_input_file)

  remove_beautier_folder()
}

richelbilderbeek/beastscriptr documentation built on April 9, 2024, 2:28 p.m.