Superfast inference for stationary Gaussian time series.

While likelihood calculations with stationary Gaussian time series generally scale as *O(N^2)* in the number of observations, this package implements an algorithm which scales as *O(N \log^2 N)*. "Superfast" algorithms for loglikelihood gradients and Hessians are also provided. The underlying C++ code is distributed through a header-only library found in the installed package's `include`

directory.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
# Superfast inference for the timescale parameter of
# the exponential autocorrelation function
exp.acf <- function(lambda) exp(-(1:N-1)/lambda)
# simulate data
lambda0 <- 1
N <- 1000
X <- rSnorm(n = 1, acf = exp.acf(lambda0))
# loglikelihood function
Toep <- Toeplitz(n = N) # allocate memory for a Toeplitz matrix object
loglik <- function(lambda) {
Toep$setAcf(acf = exp.acf(lambda))
dSnorm(X = X, acf = Toep, log = TRUE)
}
# maximum likelihood estimation
optimize(f = loglik, interval = c(.2, 5), maximum = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.