Announcement

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

  • Shift-share equivalence using ssaggregate package

    Hi,

    I am planning to use the package to run SSIV regressions. If I understood correctly the package provides a way to generate equivalent estimates considering shock-level and location-level regressions.

    I didn't get this using my own data. To test whether I did something wrong, I ran two regressions using the data provided in the replication package. Following as closely as possible what the help file says, I ran the following regressions:

    At the location-level:
    Code:
     
     use location_level, clear ivreg2 y (x = z) year t2 Lsh_manuf
    Using the package to get a shock-level dataset:
    Code:
     
     ssaggregate y x z l_sh_routine33, n(sic87dd) t(year) s(ind_share) sfile(Lshares) l(czone) controls("t2 Lsh_manuf") 	replace sic87dd = 0 if missing(sic87dd) 	merge 1:1 sic87dd year using shocks, assert(1 3) nogen 	merge m:1 sic87dd using industries, assert(1 3) nogen 	 	foreach v of varlist g year sic3 {       replace `v'= 0 if sic87dd == 0           } ivreg2 y (x=g) year [aw=s_n], r
    If I understood correctly, the two regressions should have the same estimate for the coefficient on x. What I get instead are -.27 and -.19.

    Did I understand the paper's result incorrectly or am I running the wrong regression?



  • #2
    I don't know if my understanding is correct, but your `ssaggregate` code might be missing a weight. Try adjusting your code from:
    ssaggregate y x z l_sh_routine33, n(sic87dd) t(year) ……
    to:
    ssaggregate y x z l_sh_routine33 [aw=wei], n(sic87dd) t(year) ……
    where `wei` represents the share of overall lagged regional employment.

    Also, for your initial TSLS regression, it seems you also need to include this weight:
    ivreg2 y (x = z) year t2 Lsh_manuf [aw=wei], cluster(area)
    where `area` represents the area IDs in your data.

    Finally, for your industry-level regression:
    ivreg2 y (x=g) year [aw=s_n], r
    it seems you also need to adjust it to:
    ivreg2 y (x=g) year [aw=s_n], cluster(sic3)
    Last edited by chris yin jr; 15 May 2024, 20:37.

    Comment

    Working...
    X