Hi,
I'm working on my thesis and I'm estimating a gravity model of trade. I'm using time-varying importer and exporter fixed-effects with a PPMLHDFE estimation. I have 180k observations spanning from 1948 to 2019. This is my code:
use "Temporales/falsofinal2.dta", clear
keep if indicator==0 & dupindicator2==0
keep if region_o=="south_america" | region_o=="central_america" | countryname=="Mexico"
gen l_dist = ln(distance)
ppmlhdfe TXGFOB gdp_2 l_dist contiguity landlocked island common_language common_colonizer common_legal_origin member_wto_joint agree_fta agree_cu agree_eia agree_psa, absorb(countrycode1#year countrycode2#year) d

I'm interested in the variable GDP, which is a multiplication of both countries GDP. As you can see the coefficient is close to zero because the values are so big. Literature estimates this coefficient should be close to unity when done in logarithm. I'm not sure if this coefficient can be interpreted as such since e^(-1.21e-26) is approximately +1. Instead, I want to use logarithm for this coefficient, so I do the following:
gen l_gdp = ln(gdp_2)
ppmlhdfe TXGFOB l_gdp l_dist contiguity landlocked island common_language common_colonizer common_legal_origin member_wto_joint agree_fta agree_cu agree_eia agree_psa, absorb(countrycode1#year countrycode2#year) d
However, STATA omits the new variable because of perfect collinearity with the fixed effects.

I don't understand how applying logarithms can make the same variable collinear with fixed-effects when it wasn't before.
Am I doing something wrong here?
I would appreciate your help.
I'm working on my thesis and I'm estimating a gravity model of trade. I'm using time-varying importer and exporter fixed-effects with a PPMLHDFE estimation. I have 180k observations spanning from 1948 to 2019. This is my code:
use "Temporales/falsofinal2.dta", clear
keep if indicator==0 & dupindicator2==0
keep if region_o=="south_america" | region_o=="central_america" | countryname=="Mexico"
gen l_dist = ln(distance)
ppmlhdfe TXGFOB gdp_2 l_dist contiguity landlocked island common_language common_colonizer common_legal_origin member_wto_joint agree_fta agree_cu agree_eia agree_psa, absorb(countrycode1#year countrycode2#year) d
I'm interested in the variable GDP, which is a multiplication of both countries GDP. As you can see the coefficient is close to zero because the values are so big. Literature estimates this coefficient should be close to unity when done in logarithm. I'm not sure if this coefficient can be interpreted as such since e^(-1.21e-26) is approximately +1. Instead, I want to use logarithm for this coefficient, so I do the following:
gen l_gdp = ln(gdp_2)
ppmlhdfe TXGFOB l_gdp l_dist contiguity landlocked island common_language common_colonizer common_legal_origin member_wto_joint agree_fta agree_cu agree_eia agree_psa, absorb(countrycode1#year countrycode2#year) d
However, STATA omits the new variable because of perfect collinearity with the fixed effects.
I don't understand how applying logarithms can make the same variable collinear with fixed-effects when it wasn't before.
Am I doing something wrong here?
I would appreciate your help.
Comment