Example 3.7 Matching Observations Randomly


Randomly pair observations from two data sets until a good match is found. Create a new data set that contains the results of the match. Update the value of a variable in the data set considered the master data set with information that was obtained in the match with the other data set.

Example Features

Featured StepDATA step
Featured Step Options and StatementsMODIFY statement, NOBS= and POINT= options REPLACE statement Random number function RANUNI CEIL function

Input Data Sets

Data set ENGINEERS has the available hours for seven engineers. It is the master data set. Data set ENG_PROJECTS contains a list of six engineering projects and the hours to complete on the project. It is the transaction ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.