Announcement

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

  • Time Series, IV-GMM, Replication Project, Code

    Dear all,

    I am currently trying to replicate the following paper:

    Gali, Jordi & Gertler, Mark, 1999. "Inflation dynamics: A structural econometric analysis," Journal of Monetary Economics, Elsevier, vol. 44(2), pages 195-222, October.

    For this purpose, I have specified the following equation in Stata:

    Code:
     local expr = " ( - ( - {the=0.5}*{bet=1}*F.dpdef-{ome=0.5}*L.dpdef-(1.0-{ome=0.5})*(1.0-{the=0.5})*(1.0-{the=0.5}*{bet=1})*ashare))"
    
    gmm (({the=0.5}+{ome=0.5}*(1.0-{the=0.5}*(1.0-{bet=1})))*dpdef - `expr') if qdate>=tq(1960,1) & qdate<=tq(1997,4), inst(L(1/4).dpdef L(1/4).ashare L(1/4).spr L(1/4).y_detrended L(1/4).dw L(1/4).dc)  wmat(hac nwest 12) igmm
    The moment condition I try to estimate is:

    Click image for larger version

Name:	Unbenannt.PNG
Views:	1
Size:	11.8 KB
ID:	1434672



    The Stata code above replicates this code from Winrats:

    Code:
    nonlin const ome the bet
    frml srt = (the+ome*(1.0-the*(1.0-bet)))*dp-const-the*bet*dp{-1}-ome*dp{1}-(1.0-ome)*(1.0-the)*(1.0-the*bet)*share
    compute const=0.0,ome=0.5,the=0.5,bet=1.0
    instruments constant share{1 to 4} ygap{1 to  4} dp{1 to 4} dc{1 to 4} spr{1 to 4} dw{1 to 4}
    nlls(inst,frml=srt,noprint) *
    set g1 / = srt(t)
    mcov(lags=12,damp=1) / g1
    # constant share{1 to 4} ygap{1 to  4} dp{1 to 4} dc{1 to 4} spr{1 to 4} dw{1 to 4}
    nlls(inst,frml=srt,noprint) *
    compute wmat = inv(%CMOM)
    nlls(inst,wmatrix=wmat,frml=srt,robusterrors,lags=12,damp=1) *
    declare vector vgb(4) vgf(4) vlam(4)
    compute gb = ome/(the + ome*(1.0-the*(1.0-bet)))
    compute vgb(1) = 0.0
    compute vgb(2) = the/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute vgb(3) = -ome*(1-ome*(1-bet))/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute vgb(4) = -the*(ome**2.0)/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute segb = sqrt(%scalar(tr(vgb)*%XX*vgb))
    compute gf = the*bet / (the + ome*(1.0-the*(1.0-bet)) )
    compute vgf(1) = 0.0
    compute vgf(2) = -(1.0-the)/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute vgf(3) = bet*ome/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute vgf(4) = the*(the+ome*(1-the))/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute segf = sqrt(%scalar(tr(vgf)*%XX*vgf))
    compute lam = (1.0-ome)*(1.0-the)*(1.0-the*bet)/(the+ome*(1.0-the*(1.0-bet)))
    compute vlam(1) = 0.0
    compute vlam(2) = -(1.0-the)*(1.0-the*bet)*(1.0+the*bet)/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute aa1 = -(1-ome)*(1+bet-2*the*bet)*(the+ome*(1.0-the*(1.0-bet)))
    compute aa2 = (1-ome)*(1.0-the)*(1.0-the*bet)*(1-ome*(1-bet))
    compute vlam(3) = (aa1-aa2)/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute vlam(4) = -the*(1-ome)*(1-the)*(the*(1-ome)+2*ome)/(the+ome*(1.0-the*(1.0-bet)))**2.0
    compute selam = sqrt(%scalar(tr(vlam)*%XX*vlam))
    display "gamma-b = " gb  @40 "s.e. :" segb
    display "gamma-f = " gf  @40 "s.e. :" segf
    display "lambda  = " lam @40 "s.e. :" selam
    display
    display
    The code I use should be the original code and data according to the authors. While obtaining the right signs for the coefficients, the results I obtain diverge significantly in quantitative terms.

    If anybody has ideas what could be causing the significant deviation from the author's original results, I would be very happy. I know this is kind of a black box question but I already struggled quite a while to obtain the structural parameters of the reduced form New Keynesian Philips Curve.

    Best

    Justus
Working...
X