本文整理汇总了Python中statsmodels.tsa.arima_process.ArmaProcess.acovf方法的典型用法代码示例。如果您正苦于以下问题:Python ArmaProcess.acovf方法的具体用法?Python ArmaProcess.acovf怎么用?Python ArmaProcess.acovf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类statsmodels.tsa.arima_process.ArmaProcess
的用法示例。
在下文中一共展示了ArmaProcess.acovf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_arma_acovf_persistent
# 需要导入模块: from statsmodels.tsa.arima_process import ArmaProcess [as 别名]
# 或者: from statsmodels.tsa.arima_process.ArmaProcess import acovf [as 别名]
def test_arma_acovf_persistent():
# Test arma_acovf in case where there is a near-unit root.
# .999 is high enough to trigger the "while ir[-1] > 5*1e-5:" clause,
# but not high enough to trigger the "nobs_ir > 50000" clause.
ar = np.array([1, -.9995])
ma = np.array([1])
process = ArmaProcess(ar, ma)
res = process.acovf(10)
# Theoretical variance sig2 given by:
# sig2 = .9995**2 * sig2 + 1
sig2 = 1/(1-.9995**2)
corrs = .9995**np.arange(10)
expected = sig2*corrs
assert_equal(res.ndim, 1)
assert_allclose(res, expected, atol=1e-6)