Logo

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])

Previous topic

statsmodels.sandbox.tsa.fftarma.ArmaFft.invertroots

Next topic

statsmodels.sandbox.tsa.fftarma.ArmaFft.pacf

This Page