Task 4: Key Concepts about Creating New Variables

Creating new variables by recoding or deriving is an important step in preparing an analytical dataset for dietary data.  You may want to recode an existing variable to consolidate responses.  You also may wish to derive a new variable from multiple existing variables to fit your analytic needs. Generally, recoding variables is done in a SAS data step, whereas deriving variables can be done in a SAS data step or in a SAS procedure.

Creating new variables is useful in multiple scenarios, such as:

Each of these examples is described in the “How to Create New Variables” section of this task.



close window icon Close Window to return to module page.