statsmodels.sandbox.tsa.fftarma.ArmaFft.invpowerspd

ArmaFft.invpowerspd(n) [source]

autocovariance from spectral density

scaling is correct, but n needs to be large for numerical accuracy maybe padding with zero in fft would be faster without slicing it returns 2-sided autocovariance with fftshift

>>> ArmaFft([1, -0.5], [1., 0.4], 40).invpowerspd(2**8)[:10]
array([ 2.08    ,  1.44    ,  0.72    ,  0.36    ,  0.18    ,  0.09    ,
        0.045   ,  0.0225  ,  0.01125 ,  0.005625])
>>> ArmaFft([1, -0.5], [1., 0.4], 40).acovf(10)
array([ 2.08    ,  1.44    ,  0.72    ,  0.36    ,  0.18    ,  0.09    ,
        0.045   ,  0.0225  ,  0.01125 ,  0.005625])

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.sandbox.tsa.fftarma.ArmaFft.invpowerspd.html