Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Westerlund Panel Cointegration Test xtwest

    Dear Statalist users,

    I am investigating the Environmental Kuznets hypothesis in a balanced panel framework with T=21 (1991 - 2011) and N=21 and all variables in log. In order to capture the hypothized inverted U shape form, ln_gpd^2 is included into the equation: ln_co2=ln_gdp ln_gdp^2 ln_energyuse

    I have checked the order of integration for all variables with first (IPS) and second generation (Pesaran (2007) CIPS) panel unit root test and all variables are I(1). The results of first generation panel cointegration test (Pedroni) with a constant and trend indicates a cointegration relationship between the variables in question.

    Code:
    xtpedroni ln_co2 ln_gdp ln_gdp2 ln_energyuse, nopdols mlags(3) trend lagselect(aic) adflags(3)
    
    Pedroni's cointegration tests:
    No. of Panel units: 21       Regressors: 3
    No. of obs.: 441             Avg obs. per unit: 21
    Data has been time-demeaned.
    A time trend has been included.
    
        --------------------------------------
           Test Stats. |     Panel      Group 
        ---------------+----------------------
                     v |     .5246          . 
                   rho |     .2456      1.881 
                     t |     -6.54     -7.163 
                   adf |    -5.545     -6.756 
        --------------------------------------
    All test statistics are distributed N(0,1), under a null of no cointegration,
    and diverge to negative infinity (save for panel v).
    To account for cross section depence and robustness check I want to apply second generation Westerlund error-correction-based panel cointegration tests with bootstraped p-values (xtwest). But my results indicate panel cointegration only when constant and trend are excluded from the the error correction equations and lags/leads are specified by Akaike.

    Code:
    xtwest ln_co2 ln_gdp ln_gdp2 ln_energyuse, lags(0 1) leads(0 1) bootstrap(400) lrwindow(3)
    
    Bootstrapping critical values under H0..........
    Calculating Westerlund ECM panel cointegration tests..........
    
    Results for H0: no cointegration
    With 21 series and 3 covariates
    Average AIC selected lag length: .52
    Average AIC selected lead length: .5700000000000001
    
    ----------------------------------------------------------------+
     Statistic |   Value   |  Z-value  |  P-value  | Robust P-value |
    -----------+-----------+-----------+-----------+----------------|
         Gt    |   -2.235  |   -2.354  |   0.009   |      0.135     | 
         Ga    |   -4.863  |    2.163  |   0.985   |      0.083     | 
         Pt    |   -9.683  |   -2.784  |   0.003   |      0.023     | 
         Pa    |   -6.049  |   -1.291  |   0.098   |      0.023     | 
    ----------------------------------------------------------------+
    However the results of xtwest are sensitive to the number of leads. When I exclude the leads the results indicate cointegration regardless of trend/constant for 1 user specified lag:

    Code:
    xtwest ln_co2 ln_gdp ln_gdp2 ln_energyuse, constant trend lags(1) 
    lrwindow(3) bootstrap(100)
    
    Bootstrapping critical values under H0..........
    Calculating Westerlund ECM panel cointegration tests..........
    
    Results for H0: no cointegration
    With 21 series and 3 covariates
    
    ----------------------------------------------------------------+
     Statistic |   Value   |  Z-value  |  P-value  | Robust P-value |
    -----------+-----------+-----------+-----------+----------------|
         Gt    |   -2.540  |    0.864  |   0.806   |      0.230     | 
         Ga    |   -6.385  |    5.214  |   1.000   |      0.470     | 
         Pt    |  -14.298  |   -3.198  |   0.001   |      0.020     | 
         Pa    |   -8.212  |    2.380  |   0.991   |      0.050     | 
    ----------------------------------------------------------------+
    Can anyone help me out with these conflicting results? Basically I am confused wheter to include leads or not? Or is there any reason to exclude the constant/trend? Why are the results of Pedroni independent of constant/trend and the Westerlund results not? I understand the lags but why should one include leads into the equation at all?

    Here is the Westerlund Paper:
    Westerlund, J., 2007. Testing for error correction in panel data*. Oxford Bulletin of Economics and statistics, 69(6), pp.709-748.

    And the Stata Journal article:
    http://www.stata-journal.com/sjpdf.h...iclenum=st0146

    Kind regards,

    Lars



  • #2
    Shouldn't you be using the first differences to test cointegration in xtwest?

    Comment


    • #3
      I am really curious about this point. Is it actually right that you have to use the variables in first differences?

      Comment


      • #4
        Originally posted by Justus F.C. Meyer View Post
        I am really curious about this point. Is it actually right that you have to use the variables in first differences?
        Well I would run my unit root tests first, in levels and first differences and see what they return.

        Comment


        • #5
          John Coleman I saw that this question repeats itself in other posts, according to -xtwest- help page variables should be in levels and not in first difference. Yet they do have to be unit-root variables in order to be tested for cointegration.

          Comment


          • #6
            Hi Lars I am also doing the EKC and conducting the Westerlund panel cointegration test. Can I please ask how did you choose the optimal lags and leads? I would be extremely grateful for your reply.

            Comment


            • #7
              Originally posted by Lars Sorge View Post
              Dear Statalist users,

              I am investigating the Environmental Kuznets hypothesis in a balanced panel framework with T=21 (1991 - 2011) and N=21 and all variables in log. In order to capture the hypothized inverted U shape form, ln_gpd^2 is included into the equation: ln_co2=ln_gdp ln_gdp^2 ln_energyuse

              I have checked the order of integration for all variables with first (IPS) and second generation (Pesaran (2007) CIPS) panel unit root test and all variables are I(1). The results of first generation panel cointegration test (Pedroni) with a constant and trend indicates a cointegration relationship between the variables in question.

              Code:
              xtpedroni ln_co2 ln_gdp ln_gdp2 ln_energyuse, nopdols mlags(3) trend lagselect(aic) adflags(3)
              
              Pedroni's cointegration tests:
              No. of Panel units: 21 Regressors: 3
              No. of obs.: 441 Avg obs. per unit: 21
              Data has been time-demeaned.
              A time trend has been included.
              
              --------------------------------------
              Test Stats. | Panel Group
              ---------------+----------------------
              v | .5246 .
              rho | .2456 1.881
              t | -6.54 -7.163
              adf | -5.545 -6.756
              --------------------------------------
              All test statistics are distributed N(0,1), under a null of no cointegration,
              and diverge to negative infinity (save for panel v).
              To account for cross section depence and robustness check I want to apply second generation Westerlund error-correction-based panel cointegration tests with bootstraped p-values (xtwest). But my results indicate panel cointegration only when constant and trend are excluded from the the error correction equations and lags/leads are specified by Akaike.

              Code:
              xtwest ln_co2 ln_gdp ln_gdp2 ln_energyuse, lags(0 1) leads(0 1) bootstrap(400) lrwindow(3)
              
              Bootstrapping critical values under H0..........
              Calculating Westerlund ECM panel cointegration tests..........
              
              Results for H0: no cointegration
              With 21 series and 3 covariates
              Average AIC selected lag length: .52
              Average AIC selected lead length: .5700000000000001
              
              ----------------------------------------------------------------+
              Statistic | Value | Z-value | P-value | Robust P-value |
              -----------+-----------+-----------+-----------+----------------|
              Gt | -2.235 | -2.354 | 0.009 | 0.135 |
              Ga | -4.863 | 2.163 | 0.985 | 0.083 |
              Pt | -9.683 | -2.784 | 0.003 | 0.023 |
              Pa | -6.049 | -1.291 | 0.098 | 0.023 |
              ----------------------------------------------------------------+
              However the results of xtwest are sensitive to the number of leads. When I exclude the leads the results indicate cointegration regardless of trend/constant for 1 user specified lag:

              Code:
              xtwest ln_co2 ln_gdp ln_gdp2 ln_energyuse, constant trend lags(1)
              lrwindow(3) bootstrap(100)
              
              Bootstrapping critical values under H0..........
              Calculating Westerlund ECM panel cointegration tests..........
              
              Results for H0: no cointegration
              With 21 series and 3 covariates
              
              ----------------------------------------------------------------+
              Statistic | Value | Z-value | P-value | Robust P-value |
              -----------+-----------+-----------+-----------+----------------|
              Gt | -2.540 | 0.864 | 0.806 | 0.230 |
              Ga | -6.385 | 5.214 | 1.000 | 0.470 |
              Pt | -14.298 | -3.198 | 0.001 | 0.020 |
              Pa | -8.212 | 2.380 | 0.991 | 0.050 |
              ----------------------------------------------------------------+
              Can anyone help me out with these conflicting results? Basically I am confused wheter to include leads or not? Or is there any reason to exclude the constant/trend? Why are the results of Pedroni independent of constant/trend and the Westerlund results not? I understand the lags but why should one include leads into the equation at all?

              Here is the Westerlund Paper:
              Westerlund, J., 2007. Testing for error correction in panel data*. Oxford Bulletin of Economics and statistics, 69(6), pp.709-748.

              And the Stata Journal article:
              http://www.stata-journal.com/sjpdf.h...iclenum=st0146

              Kind regards,

              Lars

              Hi Lars I am also doing the EKC and conducting the Westerlund panel cointegration test. Can I please ask how did you choose the optimal lags and leads? I would be extremely grateful for your reply.

              Ziyi

              Comment


              • #8
                Originally posted by Ziyi Cao View Post

                Hi Lars I am also doing the EKC and conducting the Westerlund panel cointegration test. Can I please ask how did you choose the optimal lags and leads? I would be extremely grateful for your reply.

                Ziyi
                Hi Cao, I am now doing the Westerlund cointegration test. May I ask did you success with you code? Can I ask how did you choose the lags and leads? I have struggled with that.

                Comment

                Working...
                X