我该如何使用statsmodels ARMA过程来拟合形式为的差分方程?
导致
y[k] = - a1 * y[k-1] + b0 * u[k] + b1 * u[k-1] + c0 * e[k] + c1 * e[k-1]
我不确定如何设置外生变量矩阵,例如:
import statsmodels.api as sm
# some stupid data
y = np.random.randn(100)
u = np.ones((100,2))
armax = sm.tsa.ARMA(y, order=(1, 1), exog=u).fit()
导致
ValueError: could not broadcast input array from shape (2) into shape (3)
这个问题很可能很容易解决,但我还是新手。
谢谢。
(我正在使用statsmodels 0.6)