O'Reilly logo

SAS Essentials: Mastering SAS for Data Analytics, 2nd Edition by Wayne A. Woodward, Alan C. Elliott

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

4PREPARING DATA FOR ANALYSIS

You've entered your data into SAS, but before you can use them in SAS, you typically need to make corrections, perform calculations, and otherwise prepare your data for analysis. This step is sometimes overlooked in classroom settings where you often use ready-to-analyze textbook data. When you gather your own data, or even when you acquire data from a database, the data may require some changes before you can use them in an analysis.

All of the data manipulation statements discussed in this chapter appear in your program code within the DATA step, except for PROC FORMAT. That is, they appear after the DATA statement and before the first RUN or PROC statement. Thus, all of the results of the data manipulations performed by these statements become part of the active data set.

4.1 LABELING VARIABLES WITH EXPLANATORY NAMES

SAS labels are used to provide descriptive names for variables. Data sets often contain cryptic variable names such as ID, SBP, WT, and so on. For people familiar with the data set, these make perfect sense. However, if ...

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