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 5.1 Adding Values to All Observations in a Data Set

Goal

Combine summary statistics that are saved in a single observation in one data set with all observations in another data set. Compute new variables based on the values of the summary and detail information.

Example Features

Featured StepDATA step
Featured Step Options and StatementsIF _N_=1 statement
Related TechniquePROC SQL, Cartesian product
A Closer LookUnderstanding How the DATA Step Adds Values from an Observation in One Data Set to All Observations in Another

Input Data Sets

The first 10 of 200 observations in STUDENTS are listed.

PROC MEANS created data set OVERALL by analyzing variable SCORE in data set STUDENTS. The 10th percentile and 25th percentile statistics for SCORE ...

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