acf.fft | R Documentation |
This function is 4-times faster than stats::acf()
acf.fft(x, lag.max = NULL)
lag.max |
maximum lag at which to calculate the acf.
Default is |
An array with the same dimensions as x containing the estimated autocorrelation.
https://github.com/santiagobarreda/phonTools/blob/main/R/fastacf.R
https://gist.github.com/FHedin/05d4d6d74e67922dfad88038b04f621c
https://gist.github.com/ajkluber/f293eefba2f946f47bfa
http://www.tibonihoo.net/literate_musing/autocorrelations.html#wikispecd
https://lingpipe-blog.com/2012/06/08/autocorrelation-fft-kiss-eigen
set.seed(1)
x <- rnorm(100)
r_fast <- acf.fft(x)
r <- acf(x, plot=FALSE, lag.max=100)$acf[,,1]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.