Announcement

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

  • Bartik shock

    Dear all,

    I have recently started using STATA after ages and I wanted to ask you how to code the Bartik shock: the model I want to replicate is attached in the word document. I have done this:
    I first create the instrument with emp_ipums_sh is the share of employment and F_output_sh is the share of output for foreign firms. Then, I do regressions by instrumenting the Foreign output share. However, I do not know how to replicate the second stage regression in the word file as there is Foreign output share replicated twice.

    thanks a lot

    Monica

    gen inst_weight=emp_ipums_sh[_n-1]*d.F_output_sh
    egen inst_F_output=sum(inst_weight) if inst_weight!=., by(year country)



    *Q1)
    **Employment Share as a dependent variable**

    quietly ivregress 2sls d.sh_agri_jobs_ipums (sh_Foutput=inst_F_output) d* $xlist, robust cluster(country) first
    outreg2 using "$OUT/regression_1.doc", replace ctitle(Emp_ipums_agri)
    Attached Files

  • #2
    Hi Monica,

    If I see your doc file, it seems to me that you are going to instrument the variation in foreign output share, while you have the level of foreign output share as a further explanatory variable. Provided that the model works (I am not familiar with it), i do not see your point: why do you believe there is a problem here? Nonetheless, if you still believe that level of foreign output share is endogenous and you want to account for that possibility, you can include that variable in your command, i.e:

    Code:
    ivreg y (z1 z2=instruments) controls
    where z1 and z2 are the level and the variation of foreign output share. If this is what you want, however, you need to select another instrument for the second endogenous variable. In your current specification you have one instrument for one endogenous variable only, which basically means that your model is exactly identified. You need to find another instrument.

    If it becomes difficult to find it, you can follow the approach suggested by Lewbel (2012), which has been implemented in the following routine:

    Code:
    ivreg2h
    I hope it helps.

    Best

    Dario
    Last edited by Dario Maimone Ansaldo Patti; 10 Jan 2022, 12:21.

    Comment

    Working...
    X