Announcement

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

  • What is the syntax of Panel ARDL model with DCCE estimator (xtdcce2)?

    Dear all,

    I am learning Stata and trying to find out how to use the xtdcce2?

    I installed xtdcce2 version 2.


    I employed 21 countries and 48 years of annual data.

    The Dynamic Common Correlated Effects Estimator employed to estimate using Jackknife bias corrections method.

    However, the command keeps showing the following error.


    . xtdcce2 lrgdpna L.lrgdpna lhc lemp, cr(lrgdpna lhc lemp) cr_lags(4) res(residuals) jack
    m_xtdcce_solver(): 3499 selectindex() not found
    xtdcce_m_partialout(): - function returned error
    <istmt>: - function returned error


    . xtdcce2 lrgdpna L.lrgdpna lhc lemp, cr(lrgdpna lhc lemp) cr_lags(4) res(residuals) rec
    m_xtdcce_solver(): 3499 selectindex() not found
    xtdcce_m_partialout(): - function returned error
    <istmt>: - function returned error


    Could you suggest me the way out?

  • #2
    xtdcce2 is a user-written command by JanDitzen from Stata Journal. I've not used this command, but it looks like your issue might be with res(residuals).

    Try taking that out. residual appears to be a postestimation option that you can use with predict.

    Code:
    xtdcce2 lrgdpna L.lrgdpna lhc lemp, cr(lrgdpna lhc lemp) cr_lags(4)  jack
    predict res, residuals

    Comment


    • #3
      Dear @Justin Blasongame

      Still, It doesn't work. I think It is not about post-estimation. The former estimation command is not working by itself.

      Comment


      • #4
        I can't replicate your issue. The dataset is different, but the set up is the same. It might help if you post an example of your dataset using dataex (see the FAQ for details).

        Code:
        net get xtdcce2
        sysuse xtdcce2_sample_dataset.dta, clear
        xtdcce2 log_rgdpo L.log_rgdpo log_hc log_ck, cr(log_rgdpo  log_hc log_ck) cr_lags(4) jack
        xtdcce2 log_rgdpo L.log_rgdpo log_hc log_ck, cr(log_rgdpo  log_hc log_ck) cr_lags(4) rec

        Code:
        . xtdcce2 log_rgdpo L.log_rgdpo log_hc log_ck, cr(log_rgdpo  log_hc log_ck) cr_lags(4) jack
        (Dynamic) Common Correlated Effects Estimator - Mean Group
        
        Panel Variable (i): id                           Number of obs     =       3999
        Time Variable (t): year                          Number of groups  =         93
                                                         Obs per group (T) =         43
        Degrees of freedom per group:
         without cross-sectional averages   = 40         F(1675, 2324)     =       2.41
         with cross-sectional averages      = 24         Prob > F          =       0.00
        Number of                                        R-squared         =       0.63
         cross sectional lags               = 4          Adj. R-squared    =       0.37
         variables in mean group regression = 279        Root MSE          =       0.05
         variables partialled out           = 1396
                                                         CD Statistic      =       0.64
                                                            p-value        =     0.5247
        -------------------------------------------------------------------------------
              log_rgdpo|     Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        ---------------+---------------------------------------------------------------
         Mean Group:   |
            L.log_rgdpo|  .4517701   .0325303   13.89    0.000      .3880118   .5155284
                 log_hc| -1.026018   .3368268   -3.05    0.002     -1.686186  -.3658495
                 log_ck|  .2310946   .0535985    4.31    0.000      .1260434   .3361458
        -------------------------------------------------------------------------------
        Mean Group Variables: L.log_rgdpo log_hc log_ck
        Cross Sectional Averaged Variables: log_rgdpo log_hc log_ck
        Heterogenous constant partialled out. Jackknife bias correction used. 
        
        . xtdcce2 log_rgdpo L.log_rgdpo log_hc log_ck, cr(log_rgdpo  log_hc log_ck) cr_lags(4) rec
        (Dynamic) Common Correlated Effects Estimator - Mean Group
        
        Panel Variable (i): id                           Number of obs     =       3906
        Time Variable (t): year                          Number of groups  =         93
                                                         Obs per group (T) =         42
        Degrees of freedom per group:
         without cross-sectional averages   = 39         F(1675, 2231)     =       2.12
         with cross-sectional averages      = 23         Prob > F          =       0.00
        Number of                                        R-squared         =       0.61
         cross sectional lags               = 4          Adj. R-squared    =       0.32
         variables in mean group regression = 279        Root MSE          =       0.06
         variables partialled out           = 1396
                                                         CD Statistic      =       8.46
                                                            p-value        =     0.0000
        -------------------------------------------------------------------------------
              log_rgdpo|     Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        ---------------+---------------------------------------------------------------
         Mean Group:   |
            L.log_rgdpo|  .2326908   .0255933    9.09    0.000      .1825289   .2828527
                 log_hc| -.6037607   .4661117   -1.30    0.195     -1.517323   .3098013
                 log_ck|  .2694361   .0541726    4.97    0.000      .1632598   .3756124
        -------------------------------------------------------------------------------
        Mean Group Variables: L.log_rgdpo log_hc log_ck
        Cross Sectional Averaged Variables: log_rgdpo log_hc log_ck
        Heterogenous constant partialled out. Recursive mean adjustment used to correct for small sample time series bias.

        Comment


        • #5
          Wondesen Teshome, which Stata version and version of xtdcce2 do you use? It looks like you use version 14 or earlier, which misses the selectindex() command. xtdcce2 should be able to identify this and has its own version of it.

          I will check if this is a general bug and might upload an update to my GitHub if necessary tomorrow.

          Comment


          • #6
            Dear @JanDitzen,

            Thank you for the quick response​​​​​​. I am using Stata version 13 and installed xtdcce2 version 2.
            Would you do everything you can, including uploading an update?

            Comment


            • #7
              Dear @JanDitzen,
              Thank you!! Problem solved!!

              The problem was related with earlier Stata version I used, which had no selectionindex() commands.

              Comment


              • #8
                Wondesen Teshome, indeed. Did you change Stata versions?

                I just uploaded an updated version of 2.21to my GitHub (see https://github.com/JanDitzen/xtdcce2...ster/xtdcce221), you can install it from
                Code:
                net from https://janditzen.github.io/xtdcce2/
                . Hope this helps.

                Jan

                Comment


                • #9
                  Dear @JanDitzen,

                  Based on the commendations you gave me, I installed Stata 15.0 and the problem is already solved. I will also use the additional recommendation while I'm not clear on how could I incorporate (add-in) the
                  GitHub version of 2.21 into my Stata.

                  THANK YOU!!!

                  Comment


                  • #10
                    Glad to hear it helped.
                    You can type the code line from above and then click on xtdcce221.
                    Best,
                    Jan

                    Comment


                    • #11
                      Dear members,


                      In the case of DCCE estimator (xtdcce2), I got two unclear things:

                      1. one of the independent variables became stationary after its second difference, I(2). Does this variable characteristic affect the estimator?

                      2. which one of the commands is appropriate to handle the non-stationary characterstic of the variables?

                      xtdcce2 lrgdpna L.lrgdpna lhc lrnna lemp, noconstant cr(lrgdpna lhc lrnna lemp) cr_lags(3)

                      xtdcce2 dlrgdpna L.dlrgdpna ddlhc dlrnna dlemp, reportc cr(dlrgdpna ddlhc dlrnna dlemp) cr_lags(3)

                      ​​​​​​​could you suggest to me?

                      Comment

                      Working...
                      X