Search code examples
pythonpython-3.xstatsmodels

Stationarity Test on Linear Regression Model


I am trying to test a linear regression model built using OLS method for co-integration/model misspecification/stationary.

I understand there are certain conditions that have to be satisfied -

If the independent and dependent variables are all stationary, then the linear regression model (OLS assumption) has been satisfied. However, if both the dependent variable and at least one of the independent variables are non-stationary, then the stationarity of the residuals is to be tested. If the residuals are stationary, then model is co-integrated. For all other stationarity results, the models are concluded as misspecified.

I also understand that I will have to use the following syntax

statsmodels.tsa.stattools.adfuller

However, I am not very sure for 'regression' input - which one should be used in this case based on documentation provided.

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

Solution

  • These are various versions of the Augmented Dickey-Fuller Test or Dickey-Fuller Test in general

    1. ADF with drift
    2. ADF with drift + deterministic trend
    3. ADF with no drift or trend