calc_act: Calculate the auto-correlation time, alternative...

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculate the auto-correlation time, alternative implementation

Usage

1
calc_act(trace, sample_interval)

Arguments

trace

the values

sample_interval

the interval in timesteps between samples

Value

the auto_correlation time

Author(s)

The original Java version of the algorithm was from Remco Bouckaert, ported to R and adapted by Richel J.C. Bilderbeek

See Also

Java code can be found here: https://github.com/CompEvol/beast2/blob/9f040ed0357c4b946ea276a481a4c654ad4fff36/src/beast/core/util/ESS.java#L161

Examples

1
2
3
4
5
6
  trace <- sin(seq(from = 0.0, to = 2.0 * pi, length.out = 100))
  act <- RBeast::calc_act(
    trace = trace,
    sample_interval = 1
  )
  testthat::expect_equal(object = act, expected = 38.18202, tolerance = 0.01)

beast-dev/RBeast documentation built on May 12, 2019, 10:02 a.m.