线性回归模型的平稳性检验
Stationarity Test on Linear Regression Model
我正在尝试测试使用 OLS 方法构建的线性回归模型 co-integration/model misspecification/stationary。
我知道必须满足某些条件 -
如果自变量和因变量都是平稳的,那么线性回归模型(OLS假设)已经满足。但是,如果因变量和至少一个自变量是非平稳的,则需要检验残差的平稳性。如果残差是平稳的,则模型是协整的。对于所有其他平稳性结果,模型被认定为指定错误。
我也明白我将不得不使用以下语法
statsmodels.tsa.stattools.adfuller
但是,我不太确定 'regression' 输入 - 根据提供的文档,在这种情况下应该使用哪一个。
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
这些是增强 Dickey-Fuller 测试或 Dickey-Fuller 一般测试的各种版本
- 带有漂移的 ADF
- 具有漂移 + 确定性趋势的 ADF
- 无漂移或趋势的 ADF
我正在尝试测试使用 OLS 方法构建的线性回归模型 co-integration/model misspecification/stationary。
我知道必须满足某些条件 -
如果自变量和因变量都是平稳的,那么线性回归模型(OLS假设)已经满足。但是,如果因变量和至少一个自变量是非平稳的,则需要检验残差的平稳性。如果残差是平稳的,则模型是协整的。对于所有其他平稳性结果,模型被认定为指定错误。
我也明白我将不得不使用以下语法
statsmodels.tsa.stattools.adfuller
但是,我不太确定 'regression' 输入 - 根据提供的文档,在这种情况下应该使用哪一个。
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
这些是增强 Dickey-Fuller 测试或 Dickey-Fuller 一般测试的各种版本
- 带有漂移的 ADF
- 具有漂移 + 确定性趋势的 ADF
- 无漂移或趋势的 ADF