Example 6.4 Adding Observations and Variables to the Master Data Set When Duplicate Matching Variable Values Exist in the Transaction Data Set

Goal

Match a master data set and transaction data set where the master data set has only unique combinations of the values of the matching variables and the transaction data set can have duplicate combinations. Keep the multiple observations for the duplicate combinations of the matching variables in the output data set. Only keep information from the transaction data set for observations with a match in the master data set.

Examples 6.1, 6.2, 6.3, 6.4, and 6.5 illustrate ways to update common variables when combining data sets. The five examples apply the methods to the same master data set. Different ...

Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.