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
Unable to reshape multiply imputed dataHello, I am unable to reshape my data into long format to run a fixed effects model. As can be seen…
strange behaviour in logit with clustering of standard errors.In performing a logistic regression with 'logit', I am encountering very significant association's (…
Selecting multiple variables (with * or ?)Dear all, Can I please ask you a question about selecting multiple variables by the use of the aste…
Generating a new numeric variable that gives the proportion of a value count and the total count of anotherHello Statalist, I'm working with an integer variable "ind" (for industry) and a 0-1 binary float v…
Exporting of Stata Graphs as .pngI am using Stata/IC 14.2 for Windows (64-bit). I am also using Windows 10 I have a long .do file whe…
Subscribe to:
Post Comments (Atom)
0 Response to Merge two data sets - error: no unique identifier
Post a Comment