Re: Understanding the variables [message #9549 is a reply to message #9525] |
Tue, 12 April 2016 13:12 |
|
user-rhs
Messages: 132 Registered: December 2013
|
Senior Member |
|
|
I would only change the names of the variables that you are going to merge on, i.e. the unique identifiers. Otherwise, if two variables are the same name in both datasets, Stata will keep only the master dataset's values, and that may not necessarily be what you want:
Quote:By default, merge treats values from the master as inviolable. When observations match, it is the
master's values of the overlapping variables that are recorded in the merged result.
(From the Stata Data Management Reference Manual, section "Treatment of overlapping variables")
Since you are a beginner Stata learner, I encourage you to visit IDRE at UCLA's Stata resources page and also by looking at the help files of the commands you want to use by typing "help [command]" into the command window, for example help merge .
rhs
|
|
|