Dear community,
I want to estimate a ppml model, where I regress FDI per country pair, year and sector on the traditional gravity variables (log of origin GDP, log of destination GDP, log of bilateral distance) as well as on the interaction terms between those traditional gravity variables and the 25 sector dummies. As I get the warning that my variance matrix is nonsymmetric or highly singular, I want to check the correlation between my regressors and the fixed effects I include (year, origin-country*sector, destination-country*sector FE) as well as between the interaction terms and the FE. I'm just not sure how to do this correctly.
How would I have to code the fixed effects? At the moment, the variable for the origin-country*sector FE ("country_origin_sector") takes on different encoded strings, e.g. "AGO52" if the observation is with Angola as origin country and sector 52. I could alternatively generate dummies (one for each origin-country-sector combination, so 668 in total, which is =1 if the observation is with AGO as origin country and in sector 52). Then, I would calculate the correlation between each of those 668 dummies with one of the traditional gravity regressors, e.g. the lngdp of origin country. Is this the way to go or should I stick to the encoded string version of the FE?
Also for the interaction terms (coded with one dummy for each sector*regressor combination), I would calculate the correlation for each of the interaction term dummies with each of the FE dummies. I'm however not sure if this is the correct way or if I should keep the FE coded as encoded strings ("AGO52", "BRA22", "DEU22" etc.).
I tried both ways but get different results so I'm not sure which one is the correct way.
I appreciate any help on this.
Best
Noemi
I want to estimate a ppml model, where I regress FDI per country pair, year and sector on the traditional gravity variables (log of origin GDP, log of destination GDP, log of bilateral distance) as well as on the interaction terms between those traditional gravity variables and the 25 sector dummies. As I get the warning that my variance matrix is nonsymmetric or highly singular, I want to check the correlation between my regressors and the fixed effects I include (year, origin-country*sector, destination-country*sector FE) as well as between the interaction terms and the FE. I'm just not sure how to do this correctly.
How would I have to code the fixed effects? At the moment, the variable for the origin-country*sector FE ("country_origin_sector") takes on different encoded strings, e.g. "AGO52" if the observation is with Angola as origin country and sector 52. I could alternatively generate dummies (one for each origin-country-sector combination, so 668 in total, which is =1 if the observation is with AGO as origin country and in sector 52). Then, I would calculate the correlation between each of those 668 dummies with one of the traditional gravity regressors, e.g. the lngdp of origin country. Is this the way to go or should I stick to the encoded string version of the FE?
Also for the interaction terms (coded with one dummy for each sector*regressor combination), I would calculate the correlation for each of the interaction term dummies with each of the FE dummies. I'm however not sure if this is the correct way or if I should keep the FE coded as encoded strings ("AGO52", "BRA22", "DEU22" etc.).
I tried both ways but get different results so I'm not sure which one is the correct way.
I appreciate any help on this.
Best
Noemi
Comment