Announcement

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

  • xtdcce2 subscript invalid

    I use stata 15 and I write
    code:
    xtdcce2 d.ltax d.lfm ,lr(l.ltax lfm) p(l.ltax d.lfm) nocross pooledconst pooledvce(nw)
    And I get this error

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



    Any help please?

  • #2
    Welcome to Statalist. You've posted in the area that focuses on questions about Mata. It's unclear that your problem is specifically a Mata one. It could be a good idea to check first that you have an up-to-date version of the program -- which comes from the Stata Journal (which you should tell us) -- and also check that it is intended to work with Stata 15:

    Code:
    SJ-18-3 st0536  . . . .  Estimating dynamic common-correlated effects in Stata
            (help xtdcce2, xtcd2 if installed)  . . . . . . . . . . . .  J. Ditzen
            Q3/18   SJ 18(3):585--617
            fits a dynamic common-correlated effects model with heterogeneous
            coefficients in a panel with a large number of observations over
            cross-sectional units and time periods
    I suggest you re-post your question in the General forum: https://www.statalist.org/forums/for...ussion/general. It'd be useful for you to first have a read through the Forum FAQ too (via the black bar at top of the page)
    Last edited by Stephen Jenkins; 27 Feb 2020, 15:38.

    Comment


    • #3
      Actually, the author of the version of xtdcce2 installed by the SJ package st0536 has subsequently released newer versions on SCC.

      The package installed from SJ is version 1.31 from 30 July 2017.
      Code:
      . which xtdcce2
      /Users/lisowskiw/Library/Application Support/Stata/ado/plus/x/xtdcce2.ado
      *! xtdcce2 1.31s - July 2017
      *! author Jan Ditzen
      *! www.jan.ditzen.net - [email protected]
      *! see viewsource xtdcce2.ado for more info.
      *! This version is for The Stata Journal. For updates, please check website above or SSC.
      The package installed from SSC is version 2 from 13 July 2019.
      Code:
      . which xtdcce2
      /Users/lisowskiw/Library/Application Support/Stata/ado/plus/x/xtdcce2.ado
      *! xtdcce2 2.0 - 13.07.2019
      *! author Jan Ditzen
      *! www.jan.ditzen.net - [email protected]
      *! see viewsource xtdcce2.ado for more info.
      If you have the SJ version,
      Code:
      ado uninstall st0536
      ssc install xtdcce2

      Comment


      • #4
        Abdramane, can you please install the latest beta version from my github via
        [CODE]
        net from https://janditzen.github.io/xtdcce2/
        [\CODE]
        The last stable beta version is version 2.1 (called xtdcce221).

        If this does not help, please answer here in the forum. If so, can you please let me know if the panel is balanced and the dimensions of cross-sectional units and time periods.

        Hope this all helps.

        Thanks,
        Jan

        Comment


        • #5
          Thanks to all for your answers,
          I have the most recent version of xtdcce2, however the panel is not balanced and the time length is 26 years for 93 countries.

          Thanks,
          Abdramane

          Comment


          • #6
            Did it work?

            Please note that when you use the beta of xtdcce2 version 2.1, the program is called xtdcce221.

            Comment


            • #7
              JanDitzen I have the same error as Abdramana when I use the xtdcce2 command. After reading your post here, I did install the latest version (xtdcce221), but this led to the following error: <istmt>: 3301 subscript invalid

              The code I use is:

              xtdcce221 d.y d.x1 d.x2, lr(l.y1 x1 x2) p(l.y x1 x2) cr(d.y d.x1 d.x2) cr_lags(1 1 1).

              I hope you can help me out.

              Comment


              • #8
                Chris Langehof , what are the time and unit dimensions of your dataset and is the dataset balanced?

                Comment


                • #9
                  JanDitzen My dependent variable is TFP growth in emerging markets i and the independent variable is TFP growth in the U.S. and I have 30 years of annual data. The dataset is balanced.

                  Comment


                  • #10
                    Without any missing values? Can you please post the command line you use?
                    Thanks!

                    Comment


                    • #11
                      JanDitzen. There are no missing values. This is the code I use: xtdcce221 d.dTFP_i d.dTFP_US d.dTFP_world_median, lr(l.dTFP_i dTFP_US dTFP_world_median) p(l.dTFP_i dTFP_US dTFP_world_median) cr(d.dTFP_i d.dTFP_US d.dTFP_world_median) cr_lags(1 1 1)

                      When I remove the d. from the cr(), the code does work, but then it reports only p-values of 1.0.
                      My goal is to estimate an ARDL(1,1,1) model using the PMG estimator and controlling for cross sectional dependence. I have a dataset with N=10 and T=30.

                      Comment


                      • #12
                        Does it work if you use only cr_lags(1)?

                        In any case, given the dimension in the cross-sectional domain, I would strongly recommend to use another estimator. Examples would be spatial models where you model the cross-section dependence with spatial lags. The calculation of the standard errors for the pooled CCE estimator relies on estimates of the MG estimator, which will be in your case biased due to the small number of cross-sectional units. In addition the small number of cross-sectional units might not be enough to approximate the strong common factors, respectively the factor structure.

                        Comment

                        Working...
                        X