Rearranging (or re-shaping) a data set can be done in several different ways in SAS. PROC TRANSPOSE is one important tool for such operations. Here we show how to use PROC TRANSPOSE to convert observations (rows) into variables (columns) in a data set. This is often useful when done with BY groups. In this example we re-arrange the FEV data set that has posttest and pretest values on different rows to a data set that has the measurements at posttest and pretest in different variables. This is useful for computing a change score, which can then be used to compute a paired t test.
This video covers essential content for the course.