Chapter 2: Grouping Data

Introduction

Task: Grouping values using IF-THEN-ELSE statements

Task: Grouping values using user-defined formats

Task: Creating groups using PROC RANK

Conclusion

Introduction

This chapter describes how to use individual values such as ages or income and create new variables that represents groups. For example, you may want to group ages in 20-year intervals or you may want to convert income into deciles. In this chapter, you will see several ways to accomplish these goals.

Task: Grouping values using IF-THEN-ELSE statements

Keywords

Grouping values

If-Then-Else statement

For this example, you have a variable called Heart_Rate that represents a person's heart rate in beats per minute. You want to create a new variable ...

Get Cody's Collection of Popular SAS Programming Tasks and How to Tackle Them now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.