Announcement

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

  • What's the syntax for panel ARDL model with CCEMG estimator? Should the xtmg command be used?

    Dear all,

    I am learning Stata and trying to figure out how to use the xtpmg command with CCE Mean Group (CCEMG) estimator.


    Recently I read the following paper:
    Benos N., and Karagiannis S., “Inequality and Growth in the United States: Why Physical and Human Capital Matter”, Economic Inquiry, Vol. 56, No. 1, (2018), 572-619.

    This paper runs shor-run and long-run estimates to investigates the relationship between economic growth, inequality and capital by using CCE Mean Group (CCEMG) estimator.

    The model is as below:
    yit=a1,iyit-1+a2,iineqit+a3,i(kit/hit)ineqit+a4(kit/hit)+uir,
    where y, ineq, k and h are panel data variables. The lag length is 4.


    I would like to know all the syntax used to estimate this model, but after reading the Stata help files and some articles regarding how to apply the xtpmg command, I'm still not sure what the syntax should be like.

    Could anyone kindly let me know exactly each syntax I can use in this example to get the results or give some suggestions? I am using Stata 15 on Mac.

    Thanks in advance!

    P.S. The results (CCEMG GMM Long-Run and Short-Run Estimates, along with the Dynamic CCEMG Estimates) in the paper are as below. The syntax I want don't necessarily generate the same type of graphs as below. I put them here just to give an idea that what kind of parameters I'd like to get.





  • #2
    Hi Yang,
    the equation you are mentioning above is a dynamic one, meaning that you would require to use the dynamic CCE estimator. The DCCE estimator is implemented in the xtdcce2 package. xtdcce2 is available on SSC. Assuming that you have variables y, ineq, khineq and kh, the syntax for your equation including each variable as a cross-sectional average, 4 lags of those and no constant is:
    Code:
    xtdcce2 y L.y ineq khineq kh, noconstant cr(y ineq khineq kh) cr_lags(4)
    The option noconstant suppresses the calculation of a constant. With cr() you define the variables added as cross-sectional averages, with cr_lags(4) you set the number of lags of the cross-sectional averages (assuming you want to to this). xtdcce2 can calculate long run coefficients as well (you are mentioning an ARDL, so I am assuming you might be interested in those). In this case you would need to add the variables for the long run relationship and the option lr_options(ardl). For example:
    Code:
    xtdcce2 y , noconstant lr(L.y ineq khineq kh) lr_options(ardl) cr(y ineq khineq kh) cr_lags(4)
    would do the job. For further reference, please see the helpfile for xtdcce2 or the two articles xtdcce2 and long run estimation using xtdcce2.

    As you mention xtmg and xtpmg, a few comments:
    • xtpmg employs the mean group (MG) estimator when using the option mg. However it does not employ the common correlated effects estimator, as it does not add cross-sectional averages.
    • xtmg employs the common correlated effects estimator (CCEMG) and an augmented version with the option aug. However it cannot estimate the dynamic version of the CCEMG estimator, because it adds only contemporaneous lags.

    Comment


    • #3
      Hi Jan,
      Thank you very much for your reply! This is really helpful for my research. Could you please also enlighten me on the questions below:

      1. I tried the first code and it worked well, but when used the code for long term, I got error 3301 as below:
      Code:
      xtdcce2 ΔGDP, noconstant lr(lgdp Δgini khgini kh) lr_options(ardl) cr(ΔGDP Δgini khgini kh) cr_lags(4)
        
      xtdcce_PointByPoint():  3301  subscript invalid
             xtdcce_m_lrcalc():     -  function returned error
                xtdcce_m_reg():     -  function returned error
                       <istmt>:     -  function returned error
      r(3301);
      2. The default confidence interval is 95%, how could I get different confidence intervals such as 90% or 99%?

      3. Could I use xtdcce2 to use the dynamic CCEMG estimator? The benefit of CCEMG is that it can be used regardless of the cross-sectional dependence or nonstationarity, so I wonder if CCE estimator can do the same?

      Comment


      • #4
        Originally posted by Yang Zhou View Post
        Hi Jan,
        Thank you very much for your reply! This is really helpful for my research. Could you please also enlighten me on the questions below:

        1. I tried the first code and it worked well, but when used the code for long term, I got error 3301 as below:
        Code:
        xtdcce2 ΔGDP, noconstant lr(lgdp Δgini khgini kh) lr_options(ardl) cr(ΔGDP Δgini khgini kh) cr_lags(4)
        
        xtdcce_PointByPoint(): 3301 subscript invalid
        xtdcce_m_lrcalc(): - function returned error
        xtdcce_m_reg(): - function returned error
        <istmt>: - function returned error
        r(3301);
        Do you have any multicollinear variables in your model or missing values?
        Can you please try the beta for the next version, see https://janditzen.github.io/xtdcce2/.

        Originally posted by Yang Zhou View Post
        2. The default confidence interval is 95%, how could I get different confidence intervals such as 90% or 99%?

        3. Could I use xtdcce2 to use the dynamic CCEMG estimator? The benefit of CCEMG is that it can be used regardless of the cross-sectional dependence or nonstationarity, so I wonder if CCE estimator can do the same?
        2. You can change the level by changing the level in Stata, see set level #
        3. xtdcce2 automatically uses the dynamic CCEMG estimator, when using the option cr_lags(). See the helpfile for further documentation.

        Hopefully this helps.

        Jan

        Comment


        • #5
          Hi Jan Ditzen, How do I install and use "xtdcce1235". I have been going through the 2019 paper that introduced and used it but I can't install it.
          Thank you for your kind help

          Comment


          • #6
            Hi Daaki Sadat
            the 2019 paper refers to an older version of xtdcce2. The latest available version on SSC is version 2.0 from July 2019. You can either install it using
            Code:
            ssc install xtdcce2
            A beta version of version 2.1 is available on my github page, please see https://janditzen.github.io/xtdcce2/.
            Hope this helps.
            Best,
            Jan

            Comment


            • #7
              Originally posted by JanDitzen View Post
              Hi Daaki Sadat
              the 2019 paper refers to an older version of xtdcce2. The latest available version on SSC is version 2.0 from July 2019. You can either install it using
              Code:
              ssc install xtdcce2
              A beta version of version 2.1 is available on my github page, please see https://janditzen.github.io/xtdcce2/.
              Hope this helps.
              Best,
              Jan
              Thank you for the reply,
              I actually have this installed. But I have been looking at your paper and came across something xtdcce2135. what is the difference between the SSC version 2.0 and 2.1?

              Secondly, does the command change from xtdcce2 to xtdcce2135?


              Click image for larger version

Name:	Screenshot 2020-01-09 at 12.22.42 AM.png
Views:	1
Size:	43.3 KB
ID:	1531230


              How did you come up with the xtdcce2135 command?
              I am so sorry to bother you but i am a novice with stata and DCCE.

              Comment


              • #8
                Daaki Sadat, no problem at all and you are welcome to ask.

                xtdcce2135 was version 1.35 of xtdcce2. The difference between 1.35 and 2.0 was some improvements how collinear variables are handled, which variables are omitted and which inverter used. In addition I added Newey-West type standard errors and fixed T standard errors for the pooled estimator. Version 2.1 has some further improvement and bug fixes (better support for factor variables), in particular with respect to very large panels. It will come with a new sub program which will enhance speed. A summary of the different versions is available here.The command name changes. If it is an final version (at SSC), the program name is xtdcce2. If it is a beta version, the command name is xtdcce2135 or xtdcce221.

                The syntax does not change. So you can just replace the xtdcce2135 with xtdcce221.

                Please let me know if you have any further questions.

                Comment


                • #9
                  Dear JanDitzen,

                  Sorry for bothering you again for an old question. Last time I used xtdcce2 to run my data, it worked well, but I got errors when estimating the long run coefficients, so I tried xtdcce221 this time:
                  Code:
                  xtdcce221 y , noconstant lr(L.y ineq khineq kh) lr_options(ardl) cr(y ineq khineq kh) cr_lags(4)
                  but I got the error 3204:
                  Code:
                   st_local():  3204  matrix found where scalar required
                                   <istmt>:     -  function returned error
                  r(3204);
                  When I deleted the "noconstant" option, or changed it into "reportconstant", I got the coefficients, but also got a warning as below:
                  Code:
                  Warning:
                  Rank condition on matrix of cross product of cross sectional averages not satisfied!
                  Only mean group estimates are consistent, unit specific estimates are inconsistent.
                  Could you please give me some advice on how to deal with the error 3204, and what the warning means?

                  Many thanks,

                  Yang
                  Last edited by Yang Zhou; 28 Jun 2020, 16:52.

                  Comment


                  • #10
                    Dear Yang Zhou , thanks for the pointer, this is indeed a bug. I uploaded a fixed version to my github.

                    On your second question: the CCE model relies on the fact that the matrix of the cross-products of the cross-sectional averages is of full rank. Essentially this means that the cross-sectional averages and their lags are not multicollinear. This is necessary for the consistency of the unit specific estimates. The mean group estimates are still consistent though. The condition ensures that the cross-product is invertible and it influences the asymptotic distribution of the unit specific group estimates, in particular their variance. If the condition does not hold and the factors are serially uncorrelated, the mean group coefficients remain consistent, but their variance depends on the variance of the (unknown) factor loadings as well. Fur a more detailed discussion see the helpfule (section Collinearity Issues) or Chudik, Pesaran 2015, Assumption 6 and page 398.

                    In a nutshell, if you are interested in the mean group coefficients, I would be careful and do robustness checks with other sets of cross-sectional averages. I would not (!) interpret unit specific coefficients in this case.

                    Hope this helps

                    Jan

                    Comment


                    • #11
                      Dear Jan,

                      Thank you very much for your reply and for fixing the bug. I really appreciate it!

                      Best,

                      Yang

                      Comment

                      Working...
                      X