How to perform unit root test?

Unit root indicates a stochastic trend in the time series. Sometimes it is known as “random walk with drift”. A time series dataset will show a systematic unpredictable pattern if it has the unit root. If a time series dataset has the unit root, the regression result will be unreasonable and provide a spurious result (in which there is large r-squared value even if the data is uncorrelated) and errant behavior (in which t-rations will not follow at- distributions). Therefore it is important to perform unit root test.

Problems with unit root

Presence of unit root also causes that series to be non-stationary. A series should be stationary where its statistical properties do not vary with time (expectation, variance, autocorrelation). Stationary data will give better results. The main problems associated with unit roots are:

  • The variance will not be constant
  • Ordinary Least Square (OLS) estimates will be biased.

Therefore, it becomes necessary to perform unit root test and correct unit root.

Using an augmented dickey-fuller test for checking the unit root

In case of serial autocorrelation, Augmented Dickey-Fuller (ADF) test is used to examine the presence of unit root. The null hypothesis for the ADF test is that there is a unit root (means series is non-stationary). Then differencing of the variable is used to make a stationary series (not autocorrelated). The alternative hypotheses are that there is no presence of unit root.

For instance, in the FDI study, the data on FDI is coming out to be non-stationary, which implies that its series do not have a constant mean, constant variance, and constant co-variance over time. Therefore the ADF test was applied to the correct unit root.

Priya Chetty

Partner at Project Guru
Priya is a master in business administration with majors in marketing and finance. She is fluent with data modelling, time series analysis, various regression models, forecasting and interpretation of the data. She has assisted data scientists, corporates, scholars in the field of finance, banking, economics and marketing.

Related articles

  • Importance of Granger causality test Granger causality is a method to examine the causality between two variables in a time series. "Causality" is related to cause and effect notion, although it is not exactly the same. It is a statistical concept which is based on the prediction.
  • How to test time series autocorrelation in STATA? This article shows a testing serial correlation of errors or time series autocorrelation in STATA. Autocorrelation problem arises when error terms in a regression model correlate over time or are dependent on each other.
  • How to perform Johansen cointegration test? To test cointegration, Johansen cointegration test is widely used which determines the number of independent linear combinations (k) for (m) time series variables set that yields a stationary process. The test gives the rank of cointegration.
  • Solution for non-stationarity in time series analysis in STATA The previous article based on the Dickey Fuller test established that GDP time series data is non-stationary. This prevented time series analysis from proceeding further. Therefore, in this article possible solution to non-stationarity is explained.
  • Lag selection and cointegration test in VAR with two variables The previous article showed that the three-time series values Gross Domestic Product (GDP), Gross Fixed Capital Formation (GFC) and Private Final Consumption (PFC) are non-stationary. Therefore they may have long-term causality. The general assumption, in this case, is that consumption […]


We are looking for candidates who have completed their master's degree or Ph.D. Click here to know more about our vacancies.