Announcement

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

  • #31
    Well, the whole point of xtdpdml was to come up with something better than system gmm, so we don't replicate system gmm.

    The support page for xtdpdml is

    https://www3.nd.edu/~rwilliam/dynamic/index.html

    It includes links to our three published papers or drafts of those papers. People can email me if they want the final versions.

    xtdpdml has its worst problems with unbalanced panels where cases enter and leave at different times. It doesn't work very well with the abdata data that comes with stata, where only 14 out of 140 cases have data for every time period.

    It also works best with large N / small T. When T gets bigger than 10 or when there are a lot of variables the correlation matrix can become too large. You data set sounds like something it can handle, at least if you are patient about getting results.

    This article does a nice job of comparing various approaches for dealing with dynamic panels. xtdpdml comes out pretty good. https://osf.io/4h8nu/


    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 18.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #32
      Ok, so in a next step I will read your instructions more deeply and try to use your package the way you intended and work with lagged variables. The basic approach should be similar to our recent discussion I guess. Using system GMM earlier yielded quite unstable results on my very unbalanced panel dataset. Maybe your package can stabilize/improve the estimations. I am looking forward to this!

      Back to the former topic: xtdpdml with fiml on my dataset of around 150,000 observations without missings took about 1 hour and the results look very promising.
      I am now running some models using the sem code provided by xtdpdml and adding some exogenous instruments in extra structural equations. This takes some more time indeed and furthermore as expected estimating fixed effects (due to the errorinv option of xtdpdml i guess) causes convergence problems. Hope I will find a solution to that...

      Anyway, I really appreciate your advice and will keep you updated on interesting insights in my application.

      Comment


      • #33
        Modifying the sem code may or may not be easy. Part of the reason we wrote xtdpdml was that hand coding was so difficult and error prone. And, it is not the quickest program. MPlus is quicker but isn’t cheap. I can’t guarantee you success with your efforts but I hope you can make it work.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 18.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #34
          Indeed, the corresponding sem code ist very long as I I include a bunch of variables.
          So I would welcome it If you improve xtdpdml to include customizable equations! :-) this would surely have several applications.

          Comment


          • #35
            I am now applying xtdpdml to a dynamic panel model I used to estimate using System GMM (xtabond2).
            xtdpdml is indeed able to consistently estimate effects of lagged variables in dynamic FE models without usual GMM drawbacks. However, I wonder is there is a way to estimate effects of regressors that are correlated with the unobserved effects. Thus regressors that are neither exogenous nor predetermined, similar to a lagged y.
            In economics, that happens sometimes, e.g. here:
            https://mpra.ub.uni-muenchen.de/1597...aper_15973.pdf
            GMM can do this, as explained by Roodman:
            https://www.stata-journal.com/sjpdf....iclenum=st0159
            I do not see this option in xtdpdml now, but do you think this is possible using structural equation models?

            Comment


            • #36
              The Roodman article is 53 pages! Where exactly is this discussed in it?
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 18.5 MP (2 processor)

              EMAIL: [email protected]
              WWW: https://www3.nd.edu/~rwilliam

              Comment


              • #37
                Sorry. I refer to Page 112 where he discusses endogeneity or RHS variables in the Arellano Bond (1991) paper. I think we can Instrument them with lagged variables, too, by simply including them in the gmmstyle() option.
                He does not refer directly to correlation with the FE rather than endogeneity in general, but the approach to handle this should be the same I guess.
                The first article I posted recommends GMM to Cover this problem. So even If the model does not include lagged dependent variables, endogeneity arises.
                Last edited by Tim Grünebaum; 21 Aug 2019, 12:07.

                Comment


                • #38
                  It might be possible but it isn't anything I have thought about. If you can draw a diagram of what the model would look like I can think about how to program it. I don't understand why you can't treat them as exogenous or predetermined. You can have lagged Xs in the model if you want them.
                  -------------------------------------------
                  Richard Williams, Notre Dame Dept of Sociology
                  StataNow Version: 18.5 MP (2 processor)

                  EMAIL: [email protected]
                  WWW: https://www3.nd.edu/~rwilliam

                  Comment


                  • #39
                    Well, the problem is briefly explained in section 2 of the Aguirregabiria paper. My baseline model looks pretty much the same as eq. (1) with three input factors which are likely to be correlated with the unobserved effects plus some other control variables. In a worst case scenario simply using OLS (resp. the FE estimator) would cause coefficients to converge towards 1. This is not the case in my analysis but I could not rule out a bias with certainty. SysGMM produces reasonable results which I would like to support using your package :-)

                    To be honest I do not know how to solve the simulteneity problem with ML. But maybe someone has an idea. GMM can do this (under GMM assumptions; discussed in section 2.3 of the Aguirregabiria paper). Furthermore it can handle other endogeneity problem like reverse causality of x and y, a problem I am also struggling with. Overall GMM is can handle a lot of things, but only if the assumptions hold. So I thought ML estimation can extend our econometric toolbox. Maybe this is future research work.

                    @Richard: I will send you a sample of my data in case you are interested. The main issue is convergence, probably because the panel is unbalanced.

                    Comment


                    • #40
                      Originally posted by Richard Williams View Post
                      I forgot, Jeremy Reynolds from Georgia nailed Table 6.3 a while back. See http://www.stata.com/statalist/archi.../msg00019.html

                      When copying his code, you have to be careful of line breaks that show up online but that shouldn't be there in the do file. For convenience, here is his code, but you should read his post for an explanation:

                      Code:
                      use "http://www.statisticalhorizons.com/wp-content/uploads/occ.dta", clear
                      
                      #delimit ;
                      sem (pf2 <- mdwgf1@c1 pf1@c2 FE@1 ERR1@1) // fixed effects and latent var (ERR1) to replace error term
                      (pf3 <- mdwgf2@c1 pf2@c2 FE@1)
                      (pf4 <- mdwgf3@c1 pf3@c2 FE@1),
                      cov(e.pf2@0) // covariance of error term set to zero to remove it from the model
                      cov(ERR1*_oexogenous@0 ERR1*FE@0 ERR1*mdwgf3) // ERR1 should only correlate with future values of cross-lagged IV
                      nocapslatent latent(FE ERR1)
                      method(mlmv);
                      #delimit cr
                      
                      
                      *Model 2 (2nd half of model)
                      #delimit ;
                      sem (mdwgf2 <- pf1@c1 mdwgf1@c2 FE@1 ERR1@1) // fixed effects and latent var (ERR1) to replace error term
                      (mdwgf3 <- pf2@c1 mdwgf2@c2 FE@1)
                      (mdwgf4 <- pf3@c1 mdwgf3@c2 FE@1),
                      cov(e.mdwgf2@0) // covariance of error term set to zero to remove it from the model
                      cov(ERR1*_oexogenous@0 ERR1*FE@0 ERR1*pf3) // ERR1 should only correlate with future values of cross-lagged IV
                      nocapslatent latent(FE ERR1)
                      method(mlmv);
                      #delimit cr
                      Thank you for this very useful elaboration. Here, each model is estimated separately as I understand. Any clue how we can estimate them jointly? mdwgf appears once as an explanatory variable and once as a dependent variable.

                      Comment

                      Working...
                      X