Expand description
Sample autocovariance / autocorrelation.
Functions§
- acf
- Sample autocorrelation for lags
0..=max_lag(acf[0] == 1). - autocovariance
- Biased (divide-by-
n) sample autocovariance for lags0..=max_lag, after mean removal. The biased estimator keeps the Toeplitz matrix positive semi-definite, which Levinson–Durbin requires. - bartlett_
se - Bartlett large-sample standard error of
acf[k]under the hypothesis that the process is MA(k−1) (i.e. true autocorrelations vanish from lagkon):sqrt((1 + 2 Σ_{j<k} ρ_j²) / n). Used to studentize the ACF so that the Fine–Hwang threshold is scale-free for MA order selection. - inverse_
acov_ from_ ar - Inverse autocovariances of a fitted AR(p), up to a
1/σ²factor that cancels in any correlation: forx_t = Σ φ_j x_{t-j} + e_t,vi(0) = 1 + Σ φ_i²andvi(k) = −φ_k + Σ_{i=1}^{p−k} φ_i φ_{i+k}. This is Cleveland’s (1972) autoregressive estimator of the inverse autocovariance function (his §4, in the α = −φ sign convention), and it is a genuine MA(p) autocovariance sequence, hence positive semi-definite.