Hello everyone,

I have the following problem and would kindly appreciate your help:

I have 2 datasets I'd like to merge.

The first one contains the stock of migrants coming from one country and staying in another in a particular year, and some individual characteristics on this stock (gender and level of education, which can be low, medium or high). It thus looks like that:

destination, origin, code of country of destination, code of country of origin, gender, year (I have data from 1980 to 2010, in 5-year intervals), low (number of migrants with low level of education), medium, high, total (adds up migrants).

The second one contains data on bilateral trade agreements and their provisions. And it looks like: Importer code, exporter code, year, agreement, year of entry in force, type (FTA, PTA, CU,...) and provisions wich are coded with dummies depending on whether the agreement cotanins such a provision or not. I then recode importer and exporter into country of destination and origin.

I'd like to merge the two datasets based on country of origin, country of destination and year but I find that in both cases there's no unique identifier. I understand why that is (in the first case, using these 3 variables, there's one case for males and one for females) and in the second case I have duplicates.

Could anyone suggest me a way to overcome this problem?

Many thanks

Julia