Transcription of Stata: Software for Statistics and Data Science | Stata
{{id}} {{{paragraph}}}
Merge datasetsSyntaxMenuDescriptionOptionsRema rks and examplesReferencesAlso seeSyntaxOne-to-one merge on specified key variablesmerge 1:1varlistusingfilename[,options]Many-to -one merge on specified key variablesmerge m:1varlistusingfilename[,options]One-to- many merge on specified key variablesmerge 1:mvarlistusingfilename[,options]Many-to -many merge on specified key variablesmerge m:mvarlistusingfilename[,options]One-to- one merge by observationmerge 1:1n usingfilename[,options]optionsDescriptio nOptionskeepusing(varlist)variables to keep from using data; default is allgenerate(newvar)name of new variable to mark merge results; default ismergenogeneratedo not createmergevariablenolabeldo not copy value-label definitions from usingnonotesdo not copy notes from usingupdateupdate missing values of same-named variables in master with valuesfrom usingreplacereplace all values of same-named variables in master with nonmissingvalues from using (requiresupdate)noreportdo not display match result summary tableforceall
2merge— Merge datasets Menu Data > Combine datasets > Merge two datasets Description merge joins corresponding observations from the dataset currently in memory (called the master dataset) with those from filename.dta (called the using dataset), matching on one or more key
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}