Merge & Append Datasets
Purpose
Once you have downloaded data files into a SAS-accessible library, you can begin to manipulate them for your particular analysis. Typically, an NHANES dietary dataset used for analysis will include data from 2 or more years and variables from more than one type of data file. You will need to merge the data to include variables from different dietary files and append the data to combine the years of data.
Task 1: Merge NHANES Data
Data files are generally organized by the following categories: Demographic, Dietary, Examination, Laboratory, and Questionnaire. To allow for timelier releases, different data files are released at different times as they are completed. Combining variables from these different data files into one dataset is called merging.
Task 2: Append NHANES Data
NHANES data files are released for public use in 2-year cycles. You may wish to combine multiple years, add additional observations, or combine different years of data files on the same variables. The process of combining years is called appending. This is similar to adding rows to a table.
Contact Us:
- National Center for Health Statistics
3311 Toledo Rd
Hyattsville, MD 20782 - 1 (800) 232-4636
- cdcinfo@cdc.gov