Dear all,
I am estimating a gravity equation with data on country pair, sector, year level. In my regression on the traditional gravity variables (log of origin GDP, log of host GDP, log of the sum of GDPS and log of distance), I add the interaction between sector dummies (I have 25 sectors) with the gravity variables. I further add year and origin country*sector as well as destination country*sector fixed effects. My question regards the inclusion of the fixed effects via the absorb() command. Would it be correct to do it like this
where the variable country_origin_sector_encode takes on e.g. the value "AGO52" if Angola invested in another country in the sector 52, and the variable country_dest_sector_encode takes on e.g. the value "BRA52" if it has been invested in Brazil by another country in the sector 52? With this, the ppmlhdfe regression identified 1069 categories for the origin varaible and 1071 categories for the destination variable. With codebook country_origin_sector_encode I get 1,620 unique values and with codebook country_dest_sector_encode, I get 1,585 unique values.
Alternatively, I tried the following:
which produces the same results. iso3_o is the iso code for origin country, iso 3 for destination country and naics2 takes on the sector numbers.
However, if I add the factor notation:
I get completely different coefficients, only 113 categories for i.iso3_o_encode#c.naics2 and 116 categories for i.iso3_d_encode#c.naics2, as well as missing values for all of the standard errors and confidence intervals and p values in the regression output.
What would be the appropriate way to include my fixed effects in the ppmlhdfe command?
Thank you in advance for any help!
Best,
Noemi
I am estimating a gravity equation with data on country pair, sector, year level. In my regression on the traditional gravity variables (log of origin GDP, log of host GDP, log of the sum of GDPS and log of distance), I add the interaction between sector dummies (I have 25 sectors) with the gravity variables. I further add year and origin country*sector as well as destination country*sector fixed effects. My question regards the inclusion of the fixed effects via the absorb() command. Would it be correct to do it like this
Code:
local gravity_sectorlevel lngdp_o lngdp_d lndistw lnsumgdp comcol col45 comlang_off lnsmp_dest naics2_1-naics2_24 lndistw_* lngdp_o_* lngdp_d_* lnsumgdp_* ppmlhdfe TotalassetsthUSD `gravity_sectorlevel', absorb(year country_origin_sector_encode country_dest_sector_encode) cluster(country_pair_encode)
Alternatively, I tried the following:
Code:
local gravity_sectorlevel lngdp_o lngdp_d lndistw lnsumgdp comcol col45 comlang_off lnsmp_dest naics2_1-naics2_24 lndistw_* lngdp_o_* lngdp_d_* lnsumgdp_* ppmlhdfe TotalassetsthUSD `gravity_sectorlevel', absorb(year iso3_o_encode#naics2 iso3_d_encode#naics2) cluster(country_pair_encode)
However, if I add the factor notation:
Code:
local gravity_sectorlevel lngdp_o lngdp_d lndistw lnsumgdp comcol col45 comlang_off lnsmp_dest naics2_1-naics2_24 lndistw_* //nicht ppmlhdfe TotalassetsthUSD `gravity_sectorlevel', absorb(year i.iso3_o_encode#c.naics2 i.iso3_d_encode#c.naics2) cluster(country_pair_encode)
What would be the appropriate way to include my fixed effects in the ppmlhdfe command?
Thank you in advance for any help!
Best,
Noemi
Comment