4   Flags and Counters


Using a Flag Variable to Determine If a Particular Event Ever Occurred in Any One of Several Observations for Each Subject

Counting the Number of Positive Outcomes for Each Patient


This is a fairly strange chapter name. Sure, you know what counters are, but what do flags have to do with SAS programming? The term “flag” is an old programming term for a variable that keeps track of things. For example, if a patient comes into the clinic on several occasions and you want to keep track if he or she ever had a particular medical problem, you could assign a flag to that task. You could turn it on (typically by setting it equal to 1) if the problem ever occurred and leave it off (typically by setting ...

Get Longitudinal Data and SAS 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.