Chapter 16: Working with Multiple Observations per Subject


Useful Tools for Working with Longitudinal Data

Describing First. and Last. Variables

Computing Visit-to-Visit Differences

Computing Differences Between the First and Last Visits

Counting the Number of Visits for Each Patient




Because SAS processes one observation at a time, you need special programming tools when you want to analyze data where there are multiple observations per subject or any other grouping variable. For example, suppose you have a data set in which each observation represents a patient visit to a clinic. You record the patient ID, the date of the visit, and some health-related values. Some common programming tasks would ...

Get An Introduction to SAS University Edition 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.