Dear Stata users
I would like to construct vertical spillovers of fdi for upstream and downstream industries. I do this in a highly manual fashion saving different stata files but it must be definitely a more elegant way to calculate these spillovers.
For the sake of exposition, I have the following table (my panel has also time and country dimensions).
I want to calculate for industry coded 1511 the sum of fdi in all other industries (1711+1920+2852+3150+3232) but before this, I want to weight the fdi variable in all these industries with an input-output coefficient as shown in the I-O coef column?
Any help will be very much appreciated.
Thank you very much in advance
Ioannis
firm id industry fdi I-O coef
1 1511 0.052
2 1711 0.853 1511-1711=0.04
3 1920 0.125 1511-1920=0.1
4 2852 0.250 1511-2852=0.06
5 3150 0.074 1511-3150=0.08
6 3220 0.074 1511-3120=0.013