Hello,

I am using an instrumental variable for trade openness to analyze the effect of trade openness on economic growth.

In my first dataset I have panel data from 1970 to 2015 for 109 countries and data on trade volume, GDP etc.

In my second dataset I have the population-weighted distances between the individual countries but of course without the annual dimension.


To do a two-stages-least-squares estimation, I tried to combine the datasetswith the merge command but it said: variable CountryCode does not uniquely identify observations in the master data


Also I am not sure how to deal with the summation in stata, is there some command I can use and to define which observations to use in the summation?

Could someone help me?

This is my instrumental variable:

Array

Thank you very much!