Hi all,
I am currently attempting to merge different data sets in Stata. I have used the 'user written program' Kountry to standardize all my country names. And have used the kountryadd syntax to ensure that across all data sets, the variations of spellings are the same. However, when I attempt to merge data sets on both the standardized country name and the year, the data set merges but only some of the observations merge completely. The rest share the same unique id (i.e. standardized country name), in the newly merged data set, but are treated as separate observations.
For example:
id year var1 var 2
'USA' 1995 2 3
'USA' 1996 5 -
'USA' 1996 - 4
Any ideas as to why this is occurring? and suggestions to remedy this would be greatly appreciated.
Many thanks Leon
I am currently attempting to merge different data sets in Stata. I have used the 'user written program' Kountry to standardize all my country names. And have used the kountryadd syntax to ensure that across all data sets, the variations of spellings are the same. However, when I attempt to merge data sets on both the standardized country name and the year, the data set merges but only some of the observations merge completely. The rest share the same unique id (i.e. standardized country name), in the newly merged data set, but are treated as separate observations.
For example:
id year var1 var 2
'USA' 1995 2 3
'USA' 1996 5 -
'USA' 1996 - 4
Any ideas as to why this is occurring? and suggestions to remedy this would be greatly appreciated.
Many thanks Leon