View source: R/asymptotic_var.R
Estimates the integrated autocorrelation time (IACT) based on Sokal (1997). Note that the estimator is not particularly good for very short series x (say < 100), but that is not very practical for MCMC applications anyway.
A numeric vector.
A single numeric value of IACT estimate.
Sokal A. (1997) Monte Carlo Methods in Statistical Mechanics: Foundations and New Algorithms. In: DeWitt-Morette C., Cartier P., Folacci A. (eds) Functional Integration. NATO ASI Series (Series B: Physics), vol 361. Springer, Boston, MA. https://doi.org/10.1007/978-1-4899-0319-8_6
set.seed(1) n <- 1000 x <- numeric(n) phi <- 0.8 for(t in 2:n) x[t] <- phi * x[t-1] + rnorm(1) iact(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.