Example 3.12 Combining and Collapsing Observations Based on a Common Variable
Reshape a transaction data set by turning related observations into single ones. Match each collapsed observation from the transaction data set with an appropriate observation from the master data set, based on the value of a key variable.
Example 3.13 also combines and collapses observations based on a common variable, but its transaction data set is indexed on the common variable and it uses index features to combine the observations.
|Featured Step||PROC TRANSPOSE and DATA step|
|Featured Step Options and Statements||PROC TRANSPOSE: BY, ID, and VAR statements, PREFIX= option DATA step: match-merge by common variable|
|Related Technique||DATA step, arrays, ...|