Skip to contents

\(S_{AR}(f) = \sigma^2/|1 + \sum a_k e^{-j2\pi fkT}|^2\). Smooth and not resolution-limited by the record length, which is both its appeal and its risk: too high an order invents peaks. Mirrors morie.fn.rgarsp.

Usage

morie_ar_spectrum(x, order = 8L, fs = 1, n_freqs = 512L)

Arguments

x

numeric signal.

order

AR order.

fs

sampling frequency.

n_freqs

frequency grid size.

Value

list: freqs, psd, a, sigma2, stable.

References

Rangayyan (2015), Ch. 3.

Examples

set.seed(1)
morie_ar_spectrum(rnorm(300), order = 4, fs = 100)$stable
#> [1] TRUE