【发布时间】:2019-07-22 03:13:52
【问题描述】:
我正在尝试测试使用 OLS 方法构建的线性回归模型,用于协整/模型错误指定/平稳。
我了解必须满足某些条件 -
如果自变量和因变量都是平稳的,那么线性回归模型(OLS假设)已经满足。但是,如果因变量和至少一个自变量都是非平稳的,则要检验残差的平稳性。如果残差是平稳的,则模型是协整的。对于所有其他平稳性结果,模型被认为是错误指定的。
我也明白我必须使用以下语法
statsmodels.tsa.stattools.adfuller
但是,我不太确定“回归”输入 - 根据提供的文档,在这种情况下应该使用哪一个。
regression{‘c’,’ct’,’ctt’,’nc’}
Constant and trend order to include in regression
‘c’ : constant only (default)
‘ct’ : constant and trend
‘ctt’ : constant, and linear and quadratic trend
‘nc’ : no constant, no trend
【问题讨论】:
标签: python python-3.x statsmodels