7   Restructuring SAS Data Sets Using Arrays


Creating a New Data Set with Several Observations per Subject from a Data Set with One Observation per Subject

Another Example of Creating Multiple Observations from a Single Observation

Going from One Observation per Subject to Many Observations per Subject Using Multidimensional Arrays

Demonstrating the Use of a Multidimensional Array

An Alternative Program

Another Example of a Multidimensional Array


One approach to working with longitudinal data sets is to restructure the data set—either going from one observation per subject (or other unit of analysis) to several or vice versa. For example, you may have several diagnosis codes in a single observation (visit) and want to ...

Get Longitudinal Data and SAS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.