Announcement

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

  • How to get the same point estimate using ivreg2 and xtabond2 with a constant term

    Dear all,

    I am writing a project using IV as my main strategy, and I want to use a dynamic panel as a robustness check.

    If we check these two following examples, they have the same results, a similar example from the xtabond2 file. But since my main IV strategy used constant term, is there a way to use the constant term in xtabond2 still?

    If I get rid of "nolevel" option, the constant will show up, but it's not the same estimation as IV anymore, hence the results are also different.

    use http://www.stata-press.com/data/r7/abdata.dta

    ivreg2 D.n (DL.n = l2.n ) if inlist(year,1978), nocons first saverf

    xtabond2 n L.n if inlist(year,1978) , gmm(L.n ) h(1) nolevel small svmat svvar


    what I want to know is if there is a way to have the same results as IV regression using xtabond2 with a constant term. I.e.,
    ivreg2 D.n (DL.n = l2.n ) if inlist(year,1978), first saverf


    Thank you so much for your help,
    Alex

  • #2
    The two commands in your example only give the same results because you restricted the estimation sample to a single year, which is no longer a panel regression.

    You can do the following using my xtdpdgmm command:
    Code:
    webuse abdata
    ivreg2 D.n (DL.n = L2.n)
    xtdpdgmm D.n DL.n, iv(L2.n)
    Note that the constant term in this regression refers to the first-differenced model, which would correspond to a linear time trend in the level model. If you want a constant for the level model instead, you can the following:
    Code:
    ivreg2 D.n (DL.n = L2.n), noconstant
    xtdpdgmm n L.n, model(diff) iv(L2.n)
    https://www.kripfganz.de/stata/

    Comment

    Working...
    X