Chapter 11: Tasks Involving Multiple Observations per Subject

Introduction

Task: Using PROC SORT to detect duplicate BY values or duplicate observations (records)

Task: Extracting the first and last observation in a BY group

Task: Detecting duplicate BY values using a DATA step

Task: Identifying observations with exactly 'n' observations per subject

Task: Computing differences between observations (for each subject)

Task: Computing the difference between the first and last observation for each subject

Conclusion

Introduction

This chapter demonstrates some of the techniques you need when you have multiple observations per subject (or any other grouping value). For example, you may have a SAS data set containing patient visits to a clinic. Each ...

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.