------------------- help for nmerge -------------------n file Merge ------------
Syntax ------
nmerge key var(s) using files to merge
The nmerge command is an extension of the Stata merge command allowing you to merge multiple files at once. The files are merged on the key variables listed in key var(s). The current file is merged with the first file in the files to merge list, then that file is merged with the second file in the files to merge list, and so on until all files have been merged.
After the matching is completed, a table is displayed showing the matching among the files. The headings of the table are the names of the data files (in upper case) and a 1 indicates if the file contributed a record, and 0 if it did not. If the current file does not have a name, it is named CURRFILE.
Example -------
. nmerge stunum using test97 test98 test99
The program tells about the merging criteria below
Merged the current file test96 on the variables stunum with the files test97 test98 test99 The matching of the files is shown below.
And it shows the table of matching below. This indicates that 76 of the cases had data from all 4 files. 9 of the records were from all files except test96 etc... and 1 record was from test96 and test99.
TEST96 TEST97 TEST98 TEST99 Freq 1 1 1 1 76 0 1 1 1 9 1 1 1 0 5 1 1 0 1 5 1 0 1 1 4 1 0 0 1 1
Author ------
Michael N. Mitchell Statistical Computing and Consulting UCLA, Office of Academic Computing mnmatucla.edu