Example 5.3 Computing Summary Data and Combining Them with Detail Data
Summarize several variables in a data set. Add these summarizations to each observation in a data set. Compute new variables by combining summary and detail variables.
|Featured Step||DATA step|
|Featured Step Options and Statements||Multiple SET statements SET statement with END= option IF _N_=1 statement DO UNTIL loop|
|Related Technique||PROC SQL, remerging summary statistics|
|A Closer Look||Selecting a Method to Combine Summary and Detail Data|
Input Data Set
Data set SESSIONS contains the number of attendees from four groups at each of three training sessions.
SESSIONS Data Set Obs session group_a group_b group_c group_d 1 March 8 29 29 34 2 June 19 3 27 8 3 ...