O'Reilly logo

Longitudinal Data and SAS by EdD Ron Cody

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

1   The RETAIN Statement

Introduction

Demonstrating a DATA Step with and without a RETAIN Statemen

Generating Sequential SUBJECT Numbers Using a Retained Variable

Using a SUM Statement to Create SUBJECT Numbers

Demonstrating That Variables Read with a SET Statement Are Retained

A Caution When Using a RETAIN Statement

Introduction

Suppose you have a SAS data set of clinical data. Each observation corresponds to a visit to the clinic and contains such information as a patient number, the date of the visit, and some information about the visit. It would be useful to compare information from one visit to another, for a given patient. How many days were there from the previous visit? Did this patient’s blood pressure go up or down? Questions such ...

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