Dear Statalist members,

I want to merge two panel data sets. One contains information regarding 2000 firms over 4 years, and one of the variables is the country they are from, but it also contains time-sensitive information such as net income and total assets. The other data set contains country-information concerning the same four years. I want to match the country information in a particular year to the firm information in that same year based on the country the firm is from. For example, the GDP per capita of Germany in 2013 needs to be added to the observations regarding German firms in 2013, and the GDP per capita of Germany in 2014 needs to be added to the observations regarding German firms in 2014, etc.

How do I do this? Many-to-one merging does not work in this case and I've heard that many-to-many merging provides useless results.

Can anyone help me?

Kind regards,
Elles