带有AR错误的线性回归模型python [英] linear regression model with AR errors python
问题描述
是否有一个python软件包(statsmodels/scipy/pandas/etc ...),该函数具有为python中具有自回归错误的线性回归模型估算系数的功能,例如下面的以下SAS实现? http://support.sas .com/documentation/cdl/en/etsug/63348/HTML/default/viewer.htm#etsug_autoreg_sect003.htm
statsmodels http://www .statsmodels.org/dev/index.html 具有ARMA,ARIMA和SARIMAX模型,这些模型采用解释变量来对均值进行建模.这对应于线性模型y = X b + e
,其中误差项e遵循ARMA或季节性ARMA过程.当移动平均项没有滞后时,AR错误是一种特殊情况.
statsmodels也具有自回归AR类,但是它不允许使用解释性变量.
在这些时间序列模型中,预测是一种有条件的预测,它考虑了历史以进行预测.
statsmodels还具有GLSAR类,它是一个线性模型,可消除自相关AR残差的影响.这使用可行的广义最小二乘估计,并且只能预测无条件项X b
.
Is there a python package (statsmodels/scipy/pandas/etc...) with functionality for estimating coefficients for a linear regression model with autoregressive errors in python, such as the following SAS implementation below? http://support.sas.com/documentation/cdl/en/etsug/63348/HTML/default/viewer.htm#etsug_autoreg_sect003.htm
statsmodels http://www.statsmodels.org/dev/index.html has ARMA, ARIMA and SARIMAX models that take explanatory variables to model the mean. This corresponds to a linear model, y = X b + e
, where the error term e follows an ARMA or seasonal ARMA process. AR errors are a special case when the moving average term has no lags.
statsmodels also has an autoregressive AR class but it does not allow for explanatory variables.
In these time series models, prediction is a conditional prediction that takes the history into account for forecasting.
statsmodels also has a GLSAR class which is a linear model that removes the effect of autocorrelated AR residuals. This uses feasible generalized least squares estimation and can only predict the unconditional term X b
.
这篇关于带有AR错误的线性回归模型python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!