Burg AR-spectrum estimation: parametric PSD via the Burg algorithm
for AR-coefficient estimation. Well-suited to short HRV windows
where Welch suffers from low spectral resolution.
Usage
pburg(x, fs, order = 16L, nfft = 256L)
Arguments
- x
Numeric vector (1-D signal).
- fs
Sampling frequency in Hz.
- order
AR model order (default 16).
- nfft
FFT length for PSD evaluation (default 256).
Value
List with filtered (PSD), name, fs, n_samples, and
extra (freqs, order, ar_coefficients).
Details
Reference: Marple, S.L. (1987) Digital Spectral Analysis with
Applications, Prentice-Hall, on the Burg algorithm.
Examples
# \donttest{
set.seed(1)
t <- seq(0, 1, length.out = 512)
x <- sin(2 * pi * 10 * t) + 0.5 * rnorm(length(t))
res <- pburg(x, fs = 512)
length(res$filtered)
#> [1] 129
# }