hi guys,

facing a problem. not sure if any of you are aware of the gravity model of bilateral trade? well it was used as an instrument for trade in Frankel and Romer's (1999) study to estimate the effect of trade on income.

they construct the instrument as follows:

"We construct IV for openness as follows.A first-stage regression of the gravity

equation is computed.Then,we take the exponential of the fitted values of bilateral trade and sum across bilateral trading partners as follows:

Exp½Fitted lnðTradeij=GDPiÞ.

This fitted openness variable is added as an additional IV for the GMM"

now i dont really know how to do this so if someone could help me, that would be great.

thanks in advance