Merge & Append Datasets
Once you have downloaded data files into a SAS-accessible library, you can begin to manipulate data for your particular analysis. Typically, an NHANES environmental chemical dataset used for analysis will include data from more than one survey cycle and variables from more than one data file. You will need to merge the data to include variables from the different files in the same survey cycle, and append the data to combine the different survey cycles for the same variables or comparable variables.
Task 1: Merge NHANES Data
Data files are generally organized by the following categories: Demographics, Examination, Laboratory, and Questionnaire. All environmental chemical data files are in the category of Laboratory and different data files represent different components which may be released at the same or different times depending on when the laboratory testing and data processing are completed. Combining variables from these different data files in a dataset is called merging, similar to adding columns in a table.
Task 2: Append NHANES Data
NHANES data files are released for public use in two-year survey cycles. Most of the environmental chemicals are measured in randomly selected subsamples within specific age groups. You will usually combine multiple cycles to increase sample sizes (observations) for your specific analysis. The process of combining different survey cycles is called appending.