本文整理匯總了Python中statsmodels.tsa.arima_process.ArmaProcess.from_estimation方法的典型用法代碼示例。如果您正苦於以下問題:Python ArmaProcess.from_estimation方法的具體用法?Python ArmaProcess.from_estimation怎麽用?Python ArmaProcess.from_estimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類statsmodels.tsa.arima_process.ArmaProcess
的用法示例。
在下文中一共展示了ArmaProcess.from_estimation方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_from_model
# 需要導入模塊: from statsmodels.tsa.arima_process import ArmaProcess [as 別名]
# 或者: from statsmodels.tsa.arima_process.ArmaProcess import from_estimation [as 別名]
def test_from_model(self):
process = ArmaProcess([1, -.8], [1, .3], 1000)
t = 1000
rs = np.random.RandomState(12345)
y = process.generate_sample(t, burnin=100, distrvs=rs.standard_normal)
res = ARMA(y, (1, 1)).fit(disp=False)
process_model = ArmaProcess.from_estimation(res)
process_coef = ArmaProcess.from_coeffs(res.arparams, res.maparams, t)
assert_equal(process_model.arcoefs, process_coef.arcoefs)
assert_equal(process_model.macoefs, process_coef.macoefs)
assert_equal(process_model.nobs, process_coef.nobs)
assert_equal(process_model.isinvertible, process_coef.isinvertible)
assert_equal(process_model.isstationary, process_coef.isstationary)