Merging with a BY statement
enables you to match observations according to the values of the BY
variables that you specify. Before you can perform a match-merge,
all data sets must be sorted by the variables that you want to use
for the merge.
In order to understand
match-merging, you must understand three key concepts:
specifies a variable
that is named in a BY statement.
specifies the value
of a BY variable.
specifies the set of all observations with the same value for the BY variable (if there is only one BY variable). If you use more than one variable in a BY statement, then a BY group is the set of observations with a unique combination of values for those ...