Announcement

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

  • #16
    Hallo,

    can and how would I use xtseqreg if one of my independent variable is endogenous and I don't have external instruments. I would like to use past levels and differences to instrument for the independent endogenous variable in a similar way as is possible in xtabond2 but I would also like to include some time-invariant variable (the endogenous variable is time variant)

    The command in xtabond2 would look like:
    Code:
    Code:
       xi: xtabond2 y l.y x1 x2 i.time, gmm(l.y l.x1) iv(x2 i.t, equation(level)) robust
    where x1 is endogenous and x2 exogenous.

    Thank you.

    Comment


    • #17
      You can replicate your xtabond2 results with the following xtseqreg syntax:
      Code:
      xi: xtseqreg y l.y x2 x2 i.year, gmm(l.y l.x1, model(difference)) gmm(l.y l.x1, lag(0 0) difference model(level)) iv(x2 i.time, model(level)) vce(robust)

      Comment


      • #18
        Please can you give me stata regression code for non linear Dynamic Panel Models. Thanks

        Comment


        • #19
          Hello Sebastian,

          Please, when I run this code: "
          xtdpdgmm L(0/2).lwage exp exp2 occ ind union, gmmiv(L.lwage, model(difference) lagrange(1 4) collapse) iv(exp exp2 occ ind union, difference model(difference)) twostep vce(robust) noserial aux xtseqreg lwage (L(1/2).lwage exp exp2 occ ind union) ed fem blk, first(, copy) iv(occ fem blk, model(level)) vce(robust)." Stata send me the error message about the second synthax. it told me that : "first invalid" I don't know what to do. futhermore, please what is your théorical argument that you use to choose yours instruments.

          Comment


          • #20
            thanks professor

            Comment


            • #21
              You need to run the two commands separately, one directly after the other. This works on my computer:
              Code:
              webuse psidextract
              
              xtdpdgmm L(0/2).lwage exp exp2 occ ind union, gmmiv(L.lwage, model(difference) lagrange(1 4) collapse) iv(exp exp2 occ ind union, difference model(difference)) twostep vce(robust) noserial aux
              
              xtseqreg lwage (L(1/2).lwage exp exp2 occ ind union) ed fem blk, first(, copy) iv(occ fem blk, model(level)) vce(robust)
              The instruments for the first equation are chosen under standard assumptions for an Arellano-Bond / Ahn-Schmidt GMM estimator. The lagged levels of the dependent variable qualify as instruments for the first-differenced equation. The remaining variables in this example are assumed to be strictly exogenous with respect to the idiosyncratic error term. Their differences can thus be used as instruments for themselves in the first-differenced model.
              For the second equation, in this example it is assumed that ed is an endogenous variable while fem and blk are exogenous (and thus serve as their own instruments). In addition, it is assumed that occ from the first stage is exogenous with respect to the individual-specific effects as well and correlated with ed, thus qualifies as an instrument for the latter.

              Comment


              • #22
                I did it , But stat told me this error ""first invalid" for the second command

                Comment


                • #23
                  I did it , But stata told me this error ""first invalid" for the second command

                  Comment


                  • #24
                    futhermore, please this two command is same with this one ?:
                    . xtseqreg lwage (L(1/2).lwage exp exp2 occ ind union) ed fem blk, gmmiv(L.lwage, model(difference) lagrange(1 4) collapse equation(#1)) iv(exp exp2 occ ind union, difference model(difference) equation(#1)) iv(occ fem blk, model(level) equation(#2)) twostep vce(robust) both

                    Comment


                    • #25
                      Sorry, I cannot figure out why you get this error message.

                      Your last command line is almost the same as the two separate commands. The difference is only that it does not make use of the nonlinear Ahn-Schmidt moment conditions valid under absence of serial correlation (option noserial of xtdpdgmm). Without this option, the two separate commands are equivalent to the one command line you have specified in your last post.

                      Comment


                      • #26

                        . xtseqreg fdi (L(1/2).fdi xconst gdp ipc pop gov invest rent trade) legor_fr legor_uk pro, first(, copy) iv(legor_fr legor_uk pro, model(l
                        > evel)) vce(robust)

                        that is stata message: "option first() incorrectly specified"

                        Comment


                        • #27
                          How did you specify your first-stage command? Did you use xtseqreg as well for the first stage or xtdpdgmm? The first(, copy) option is only needed if your are using xtdpdgmm for the first stage. Otherwise, just remove this option.

                          Comment


                          • #28
                            that is the two synthax that I run:

                            xtdpdgmm L.fdi xconst gdp ipc pop gov invest rent trade, gmmiv(L.fdi, model(difference) lagrange(1 4) collapse) iv(xconst gdp ipc pop gov invest rent trade, difference model(difference)) twostep vce(robust) noserial aux
                            xtseqreg fdi (L(1/2).fdi xconst gdp ipc pop gov invest rent trade) legor_fr legor_uk pro, first(, copy) iv(legor_fr legor_uk pro, model(level)) vce(robust)

                            Comment


                            • #29
                              That explains the error message.

                              In your first model, you did not specify the dependent variable fdi, and in your second model you were specifying the two lags L(1/2).fdi as first-stage variables while you actually only have used one lag L.fdi. The specifications need to match each other. Try the following:
                              Code:
                              xtdpdgmm fdi L.fdi xconst gdp ipc pop gov invest rent trade, gmmiv(L.fdi, model(difference) lagrange(1 4) collapse) iv(xconst gdp ipc pop gov invest rent trade, difference model(difference)) twostep vce(robust) noserial aux
                              
                              xtseqreg fdi (L.fdi xconst gdp ipc pop gov invest rent trade) legor_fr legor_uk pro, first(, copy) iv(legor_fr legor_uk pro, model(level)) vce(robust)

                              Comment


                              • #30
                                very thanks Sebastian

                                God Bless You

                                Comment

                                Working...
                                X