Skip to contents

\(R_{xx}(m) = \frac{1}{N-|m|}\sum x(n)x(n+m)\) (unbiased) and the divisor-N biased form. The unbiased estimate is NOT guaranteed positive semi-definite, so feeding it to an AR solve can yield an unstable model – which is why morie_yule_walker uses the biased one. Mirrors morie.fn.rgacf.

Usage

morie_acf_estimate(x, max_lag = NULL)

Arguments

x

numeric signal.

max_lag

maximum lag; N - 1 by default.

Value

list: lags, acf_unbiased, acf_biased, N.

References

Rangayyan (2015), Ch. 3.

Examples

set.seed(1)
morie_acf_estimate(rnorm(50), max_lag = 5)$acf_unbiased
#> [1]  0.68748141  0.03104690 -0.10900106 -0.06796563  0.06613712 -0.15976493