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)
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)
Comment