Adding country-pair fixed effects to regression analyses
How does one go about including country-pair fixed effects in plm package regressions (OLS, RE, FE, and Hausman-Taylor estimators)? I am hoping to use plm because it is very easy and I'm baby-new to R.
I have received the following code from a kind professor who I don't actually know:
# do not worry about the other variables, focus on the G() portion which is using Pair FE, exporter-year, and importer-year
felm(ln_trade~bc_o + l_bc_o + bc_d + l_bc_d + G(pairid) + G(isoexyear) + G(isoimyear),
I have no idea how to implement that code at all and figure there has to be some simpler way than using a complicated method in felm.