Announcement

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

  • xtdcce2 is not working

    Hi everyone,

    I am learning how to use the command xtdcce2 developed by Jan Ditzen.

    To do this, I am attempting to replicate the first example provided by Ditzen (2018, Stata Journal) for estimating the Solow Growth model using the Jackknife bias-corrected Dynamic CCEMG estimator.

    I downloaded the dataset xtdcce2_sample_dataset.dta and entered the following commands:

    use xtdcce2_sample_dataset.dta, clear
    xtset id year
    xtdcce2 log_rgdpo L.log_rgdpo log_ck log_ngd, crosssectional(log_rgdpo log_ck log_ngd) cr_lags(3) jackknife


    However, I encountered the following error:

    xtdcce_m_reg(): 3301 subscript invalid
    xtdcce_m_reg(): - function returned error
    <istmt>: - function returned error
    r(3301);

    I'm using STATA 17, and xtdcce2 4.7 - 03.06.2024.

    Actually, the problem occurs by adding the Jackknife correction
    Last edited by Frank Giaquinto; 07 Jan 2025, 05:59.

  • #2
    did you install moremata?

    Comment


    • #3
      Dear George,

      Thank you very much for your response. Yes, I have installed moremata.

      The code works if I omit jackknife, but doing so means the jackknife correction is not applied.

      Comment


      • #4
        I can replicate the problem. I'd send a note to Stata.

        Comment


        • #5
          Thanks a lot!

          Comment


          • #6
            Somewhat surprising, I am on Stata 18 and on version:
            Code:
            xtdcce2 2.0 - 13.07.2019; update 22.12.2020
            And it works fine.

            Comment


            • #7
              Actually, even the Dynamic CCEMG IV Estimator cannot be implemented. The following command (taken from the Stata Journal article published by Ditzen, 2018) does not work:

              xtdcce2 log_rgdpo L.log_rgdpo log_ngd (log_ck = L.log_ck L2.log_ck), crosssectional(log_rgdpo log_ck log_ngd) cr_lags(3) ivreg2options(noid)

              Indeed, I got the following error:

              __000014_SMF not found

              Is there a way to install the version released just before the latest one?
              Last edited by Frank Giaquinto; 10 Jan 2025, 10:04.

              Comment


              • #8
                There was a bug caused by the recently implemented calculation of information criteria which caused both errors. This bug is now fixed. Please install the latest version from GitHub:
                Code:
                net install xtdcce2 , from("https://janditzen.github.io/xtdcce2/")

                Comment


                • #9
                  Dear Jan,

                  Thank you very much for fixing the bug so quickly - everything works now. I have a clarification question about your code if I may ask.

                  Does the (Dynamic) Common Correlated Effects Estimator - Mean Group IV implement the methodology proposed by Neal (2015)? If so, what kind of weight matrix does the GMM procedure use in the example (the replication of your paper)? Does it return an efficient HAC weight matrix?

                  Thank you for your tremendous work and research on these topics.

                  Comment


                  • #10
                    In general no - however there is a way around it. xtdcce2 can use ivreg2 to estimate the IV model. Hence if you pass the appropriate options to ivreg2, it should be possible to use GMM with a HAC weight matrix.

                    I would like to point out two things however: 1) The paper by Neal (2015) was - to the best of my knowledge - never published. 2) the literature on (D)CCE + IV is very scarce and it depends on the source of endogeneity. In the large N,T setting with interactive fixed effects, endogeneity can results from a) reversed causality ("classical micro setting"; Y <-> X), b) lags (dynamic GMM setting), c) spatial endogeneity via spatial lag or d) strong cross-section dependence. There is a literature on b, c and d, but besides Neal (2015) none on a). Hence I would be very careful employing the CCE + IV (+ MG which even complicates things more) estimator and only do it if absolutely necessary.

                    Comment


                    • #11
                      Dear Jan,
                      Thank you for clarifying this point. I have been trying to implement the Pesaran and Smith (1995) Mean Group (MG) Estimator using an ARDL specification, but I encountered a technical issue. To ensure that I am running the code correctly, I am using the dataset jasa2 from Ditzen (2021, Stata Journal). The article provides the following code to implement the CS-ARDL estimator:

                      xtdcce2 c if year >= 1962, lr(L.c L(0/1).y pi L.pi) ///
                      lr_options(ardl) crosssectional(_all) cr_lags(3)

                      This code works perfectly. However, let us suppose that cross-sectional dependence between errors is not an issue, and I wish to drop the cross-sectional averages. In principle, this adjustment should allow me to estimate the MG-Estimator (Pesaran and Smith, 1995). The modified command I use is:

                      xtdcce2 c if year >= 1962, lr(L.c L(0/1).y pi L.pi) ///
                      lr_options(ardl) crosssectional(_none)

                      However, I get the following error:

                      invsym(): 3300 argument out of range
                      m_xtdcce_inverter(): - function returned error
                      xtdcce2_ic(): - function returned error
                      xtdcce_m_reg(): - function returned error
                      <istmt>: - function returned error

                      I would appreciate your guidance on resolving this issue.

                      Finally, I have a couple of methodological questions that I believe would be very enlightening. Thank you in advance for your time and assistance:

                      1) Assuming slope heterogeneity, would you agree that a preliminary (and imprecise) approach to address unobserved common factors is to apply the between transformation to each series to eliminate the time dummies?

                      2)
                      • On page 699 of your article in the Stata Journal (2021), you provide a table with the point estimates of the coefficients for an ARDL(1,1,1) model where cross-sectional averages are included. For example, the point estimate of the long-run coefficient for pi is reported as -0.5976.
                      • Is it correct that this value cannot be consistently derived by taking the ratio of the sum of the short-run coefficients for pi (-0.113 - 0.0146) to (1 minus the sum of the short-run coefficients for the dependent variable, 0.3888)? This is because the long-run coefficient is not linear in the short-run parameters, and the ratio of two unbiased estimators does not necessarily yield an unbiased estimator.
                      • The paper mentions that long-run coefficients are computed differently compared to the Maximum Likelihood method used by the xtpmg command. Are these methods numerically equivalent?
                      • Are the short-run coefficients directly interpretable in this context? For instance, if the dependent variable is log consumption and pi is log inflation, would it be accurate to interpret that a 1% increase in inflation is expected to reduce consumption in the short term by (-0.113 - 0.0146)%?
                      3)
                      When using an ARDL specification, are weak stationarity and cointegration still concerns? My understanding is that the ARDL specification should be robust to the presence of cointegration and to different orders of integration I(d), provided that d<2. However, do you still recommend conducting panel unit root tests to ensure that the variables are not I(2) ? Thank you very much!
                      Last edited by Frank Giaquinto; 14 Jan 2025, 08:36.

                      Comment


                      • #12
                        I have overlooked this post.

                        If you do not want to add cross-section averages, i.e. use the MG estimator, the option is "nocrosssectional".

                        On your questions:
                        1) Yes, but it would be very imprecise. One would have to write this down properly, but I think there will still be a bias in it. Hence I would avoid it.
                        2) You need to carefully differentiate if you take the averages of the individual long run coefficients, or calculate the long run coefficients from the averaged short run coefficients. Results between xtpmg and xtdcce2 are not numerically equivalent. See also the discussion in the paper.
                        3) Yes, I would definitively recommend to do those tests.

                        Hope this clarifies your questions.

                        Comment


                        • #13
                          Dear Jan, thank you very much!

                          Comment

                          Working...
                          X