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
Related Posts with Merge two data sets - error: no unique identifier
Add Optional t-test to Stata ProgramI have a stata program that displays a twoway bar graph and I want to add a t-test to the program, b…
C-statistic at specific point in time.Dear all Sorry if this topic has been previously addressed, but could not find it here or elsewhere…
esttabWhy is it when I enter the following command: "forvalues i = 1/5 { regress edge percentFRL ipr_se_v…
gmatch and psmatch2I am trying to conduct a logistic regression after propensity score matching. I tried both gmatch ps…
asreg : Updated 2021: new flexible window | Fastest rolling regressions in StataThanks to Kit Baum, the updated version of asreg is now available on the SSC. The new version is ver…
Subscribe to:
Post Comments (Atom)
0 Response to Merge two data sets - error: no unique identifier
Post a Comment