## Bootstrapping Cointegrating Regression

Questions and discussions on Vector Autoregressions

### Bootstrapping Cointegrating Regression

This does bootstrapping of a cointegrating regression from Li and Maddala, "Bootstrapping cointegrating regressions", J. of Econometrics 80 (1997) pp 297-318

Code: Select all
`** Example of bootstrapping an FMOLS estimate of cointegrating vectors.* Based upon the technique described in Li and Maddala, "Bootstrapping* cointegrating regressions", J. of Econometrics 80 (1997) pp 297-318*open data kpswdata.ratcalendar(q) 1947all 1988:04data(format=rats) / c in y mp dp r*@fm(lags=5,det=constant) 1954:1 *# mp y r** Get the FM residuals and the estimated coefficient vector. Depending* upon how you're planning to use the bootstrap, you might want to make* b equal to something else (like the value the cointegrating vector* would take under a null hypothesis).*set u = %residscompute b=%beta** Difference the RHS endogenous variables*diff y / dydiff r / drcompute [vector] betamean=%zeros(3,1)compute [symm]   betacmom=%zeros(3,3)*compute ndraws=1000do draws=1,ndraws   *   * Do a block bootstrap for the stationary elements.   *   boot(block=10,method=stationary) entries 1954:1 *   *   * The first differences and the residuals are resampled together.   * Rebuild the RHS endogenous variables, and then the dependent   * variable   *   set(first=0.0) resampy 1953:4 1988:4 = resampy{1}+dy(entries(t))   set(first=0.0) resampr 1953:4 1988:4 = resampr{1}+dr(entries(t))   set resampmp 1954:1 1988:4 = b(1)+b(2)*resampy+b(3)*resampr+u(entries(t))   *   * Re-estimate and update the betamean and betacmom matrices   *   @fm(lags=5,det=constant,noprint) 1954:1 *   # resampmp resampy resampr   compute betamean=betamean+%beta-b   compute betacmom=betacmom+%outerxx(%beta-b)end do drawscompute betamean=betamean/ndrawscompute betacmom=betacmom/ndrawslinreg(create,coeffs=b,covmat=betacmom,noscale) mp# constant y r`

Data file:
kpswdata.rat