paulofelipe / Structural-Gravity

R codes to "An Advanced Guide to Trade Policy Analysis: The Structural Gravity Model"
12 stars 11 forks source link

Use of Kendall correlation #2

Open pachadotdev opened 1 year ago

pachadotdev commented 1 year ago

Hi!

In this line https://github.com/paulofelipe/Structural-Gravity/blob/master/R/aux_functions.R#L171 the equivalent to https://personal.lse.ac.uk/tenreyro/r2.do is obtained when we pass method = "kendall" to make it pairwise.

I have a version with formulas instead of y/x here https://github.com/r-econometrics/lfe/blob/main/R/feglm.R#L192.

pachadotdev commented 1 year ago

I still have my very slow scripts done 100% with glm() and vcovHC(), those are useful to compare but some model take more than 3 hrs to fit.