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
marginal analysis after ivprobitHi all, I am using ivprobit model, and label_use is the endogenous variable. ivprobit healthy_decis…
ANOVA with Holm CorrectionHi all, I’ve been asked to run an ANOVA with a Holm correction. I need to compare Stigma (continuou…
Process for LCA in StataI'm trying to do an LCA for the first time. I have read the Stata manual, various papers about LCA, …
do file editing - period appears after double spaceHello Stata Folk When I enter two spaces in the do file editor (i.e. press the space bar twice) the…
Creating additional records for overlapping event windows to merge the two datasetsDear Statalist Users, I have a problem with merging the two datasets. I work in Stata 15. The first…
Subscribe to:
Post Comments (Atom)
0 Response to Merge two data sets - error: no unique identifier
Post a Comment