calc_esses {tracerer}R Documentation

Calculates the Effective Sample Sizes from a parsed BEAST2 log file

Description

Calculates the Effective Sample Sizes from a parsed BEAST2 log file

Usage

calc_esses(traces, sample_interval)

Arguments

traces

a dataframe with traces with removed burn-in

sample_interval

the interval in timesteps between samples

Value

the effective sample sizes

Author(s)

Richèl J.C. Bilderbeek

Examples

  # Parse an example log file
  estimates_all <- parse_beast_log(
    get_tracerer_path("beast2_example_output.log")
  )

  # Remove burn-ins
  estimates <- remove_burn_ins(estimates_all,
    burn_in_fraction = 0.1
  )

  # Calculate the effective sample sizes of all parameter estimates
  esses <- calc_esses(
    estimates,
    sample_interval = 1000
  )

  expected <- c(10, 10, 10, 10, 7, 10, 9, 6)
  testit::assert(all(esses == expected))

[Package tracerer version 2.0.1 Index]