# Cointegration Test using Stata

We now present a short answer to a common questions on cointegration test using Stata. This question commonly appear on many social media groups that what is cointegration test or how can we test for cointegration using Stata. The answer is not so simple but also not that difficult. The first thing we need before finding an exact answer to such questions on cointegration test using Stata needs the type of data one has to deal with. So we present our answer in two sections. Section 1 lists down the methods one can use for cointegration test for time series data and secon section lists down the approaches one can use for panel data. **Enroll for Time Series Analysis using Stata here.**

### Time Series Cointegration test using Stata

bayerhanck from http://fmwww.bc.edu/RePEc/bocode/b

'BAYERHANCK': module to compute test for non-cointegration / bayerhanck produces a joint test-statistic for the null of / no-cointegration based on Engle-Granger, Johansen maximum / eigenvalue, Boswijk, and Banerjee tests. / KW: cointegration / KW: Engle-Granger / KW: Johansen / KW:

egranger from http://fmwww.bc.edu/RePEc/bocode/e

'EGRANGER': module to perform Engle-Granger cointegration tests and 2-step ECM estimation / egranger conducts tests for cointegration proposed by Engle and / Granger (1987), reporting test statistics plus critical values / calculated by MacKinnon (1990, 2010). egranger will also / estimate an

ghansen from http://fmwww.bc.edu/RePEc/bocode/g

'GHANSEN': module to perform Gregory-Hansen test for cointegration with regime shifts / ghansen performs the Gregory-Hansen test for cointegration with / regime shifts (structural breaks) proposed in Gregory and Hansen / (1996) The test's null hypothesis is no cointegration against the /

johans from http://fmwww.bc.edu/RePEc/bocode/j

'JOHANS': module to perform Johansen-Juselius ML estimates of cointegration / This command is an updated version of mlcoint, originally written / by Heinecke and Morris, part of the tslib (Stata 5) time-series / package, the use of which is somewhat problematic under Stata 6 / or 7.

lmeg from http://fmwww.bc.edu/RePEc/bocode/l

'LMEG': module to compute Augmented Engle-Granger Cointegration Test at Higher Order AR(p) / lmeg computes Augmented Engle-Granger Cointegration Test at / Higher Order AR(p) / KW: cointegration / KW: Engle-Granger / KW: AR(p) / Requires: Stata version 11.0 / Distribution-Date: 20120618 /

mlcoint from http://fmwww.bc.edu/RePEc/bocode/m

'MLCOINT': module to compute Johansen cointegration tests / This is a corrected version of mlcoint from that originally / published in STB-21 and updated to work under Stata 6, available / in the Becketti tslib. That version failed when more than 9 / variables were included in the varlist.

ranktest from http://fmwww.bc.edu/RePEc/bocode/r

'RANKTEST': module to test the rank of a matrix using the Kleibergen-Paap rk statistic / ranktest implements the Kleibergen-Paap (2006) rk test for the / rank of a matrix. Tests of the rank of a matrix have many / practical applications. For example, in econometrics the / requirement

vececm from http://fmwww.bc.edu/RePEc/bocode/v

'VECECM': module to estimate vector error correction models (ECMs) / vececm estimates a vector error correction model (ECM) after one / or more cointegrating vectors have been identified using / Johansen's maximum-likelihood cointegration rank test (see help / johans). vececm

### Panel Data Cointegration test using Stata

nharvey from http://fmwww.bc.edu/RePEc/bocode/n

'NHARVEY': module to perform Nyblom-Harvey panel test of common stochastic trends / nharvey estimates one form of the test of common stochastic / trends developed by Nyblom and Harvey (NH, 2000). The test is of / the validity of a specified value of the rank of the covariance / matrix of

xtdolshm from http://fmwww.bc.edu/RePEc/bocode/x

'XTDOLSHM': module to perform panel data cointegration / xtdolshm fits a model of depvar on indepvars using Kao and / Chiang (2000) Dynamic Ordinary Least Squares for Cointegrated / Panel Data with homogeneous long-run covariance structure across / cross-sectional units. You must

xtpedroni from http://fmwww.bc.edu/RePEc/bocode/x

'XTPEDRONI': module to perform Pedroni's panel cointegration tests and Panel Dynamic OLS estimation / xtpedroni has two functions: First, it allows Stata users to / compute Pedroni's (OBES 1999, REStat 2001) seven test statistics / under a null of no cointegration in a heterogeneous

xtpmg from http://fmwww.bc.edu/RePEc/bocode/x

'XTPMG': module for estimation of nonstationary heterogeneous panels / We introduce a new Stata command, xtpmg, for estimating / nonstationary heterogeneous panels in which the number of groups / and number of time-series observations are both large. Based on / recent advances in the

xtwest from http://fmwww.bc.edu/RePEc/bocode/x

'XTWEST': module for testing for cointegration in heterogeneous panels / The xtwest command implements the four panel cointegration tests / developed by Westerlund (2007). The underlying idea is to test / for the absence of cointegration by determining whether there / exists error