Good morning everyone.
I need to merge two datasets but the do file doesn't work. The structure is this:
use dataset2
sort countryname year
save dataset2, replace
use maindataset
sort countryname year
merge countryname year using dataset2 --------------------> at this point appears this message: (you are using old merge syntax; see [D] merge for new syntax); variable _merge already defined r(110); and the Do-File end
drop if _merge==2
save maindataset, replace
Someone could explain me why?
Related Posts with Merge two datasets
Addressing endogeneity in PPMLDear all, I have come across 2 methods of addressing endogeneity in ppml models, the use of bilater…
Help with writing code for data with value labelsHi all, please consider the following data set: input str3 ID byte str9 shock byte str1 evnt ID…
Interpret interaction term of two continuous variables after ordered logit estimation.Hi Statalist members, I'm running the ordered logit model and find struggling how to interpret the …
Read dta file from line n to endUsing this excellent advise, I am running a loop to read in a 60GB dta file and save it in chunks (a…
True discard of precision with roundHi all, I'm using Stata 14 and wish to round data in one of my variables to 1 dp. I shall be retaini…
Subscribe to:
Post Comments (Atom)
0 Response to Merge two datasets
Post a Comment