O'Reilly logo

Combining and Modifying SAS® Data Sets: Examples Second Edition by Michele M. Burlew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example 3.7 Matching Observations Randomly

Goal

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required