Even though I went through many related discussions and read many papers about this topic, I couldn't find the solution. I will be thankful for your advice here. I am working with balanced panel data and running a regression with year and industry fe, testing whether Chinese exports to Brazil have displaced Argentina exports to Brazil during the 2001-2017 period.
I am running two regressions, for the first one I use ln of China’s export to Brazil (In_Chn_X_Bra) and for the second one I use ln of China’s export to Brazil weighted by the lagged share of Chinese exports in Brazil imports (In_wChn_X_Bra) (The intuition for weighting export growth by lagged trade share is that China’s export growth will only matter if China is a significant supplier).
I have run xrteg in the first one with no problem:
Code:
xtreg In_Arg_X_Bra In_Chn_X_Bra In_Bra_I_Wld i.year, fe
In_Arg_X_Bra: ln of exports of Argentina to Brazil at year t in a given sector h
In_Chn_X_Bra: ln of exports from China to Brazil at year t in a given sector h
In_Bra_I_Wld: ln of imports of Brazil from all countries (other than China and Argentina)
But I am not sure how should I calculate (In_wChn_X_Bra) to run xtreg in the second one. This is what I've tried so far, but the result for the coefficient In_wChn_X_Bra is far from being significant (P = 0.548), while for the first regression it is (P = 0.000). I might be making some mistake here:
Code:
**1.Add new var to the panel (no commands needed here) **In_Bra_I_AWld: ln of imports of Brazil from all countries (including China and Argentina) **2.Generate new var: generate Chn_Share = Chn_X_Bra/Bra_I_Wld **3.Log that new var: gen In_Chn_Share=ln(Chn_Share+1) **3.Lag that new var: generate lagChn_Share = Chn_Share[_n-1] **4.Generate new var: generate In_wChn_X_Bra = In_Chn_X_Bra*Chn_Share **6.Run new regression: xtreg In_Arg_X_Bra In_wChn_X_Bra In_Bra_I_Wld i.year, fe
I am using Stata/SE 15.0.
Thanks in advance for your cooperation and apologies if I made any mistake writing, it is my first time posting here and I have carefully read the rules.
Kind regards,
Giuliana.
0 Response to Advice on calculating weighted variable by lagged variable
Post a Comment