statsmodels.tsa.stattools.acovf¶
-
statsmodels.tsa.stattools.
acovf
(x, unbiased=False, demean=True, fft=None, missing='none', nlag=None)[source]¶ Autocovariance for 1D
- Parameters
- xarray
Time series data. Must be 1d.
- unbiasedbool
If True, then denominators is n-k, otherwise n
- demeanbool
If True, then subtract the mean x from each element of x
- fftbool
If True, use FFT convolution. This method should be preferred for long time series.
- missingstr
A string in [‘none’, ‘raise’, ‘conservative’, ‘drop’] specifying how the NaNs are to be treated.
- nlag{int, None}
Limit the number of autocovariances returned. Size of returned array is nlag + 1. Setting nlag when fft is False uses a simple, direct estimator of the autocovariances that only computes the first nlag + 1 values. This can be much faster when the time series is long and only a small number of autocovariances are needed.
- Returns
- acovfarray
autocovariance function
References
- *
Parzen, E., 1963. On spectral analysis with missing observations and amplitude modulation. Sankhya: The Indian Journal of Statistics, Series A, pp.383-392.