Download Data Files
Throughout, this tutorial uses examples related to calcium and milk to illustrate the principles and instructions presented in the modules. We have created three full programs for these examples, entitled “Milk,” “Food Sources,” and “Supplement.” These programs encompass all the steps involved in preparing an analytic dataset and conducting the various analyses covered in this tutorial. There are is an additional fourth program, entitled “Outliers,” that is used as an example in Module 9. These full programs can be found in the Additional Resources section of the tutorial. However, starting with this module and continuing through the end of the course, shorter snippets of code can be found in most of the “How To” sections to illustrate the topic being discussed.
In order to create and use these programs, you need to first download data files. NHANES dietary data files are available for download from the website as SAS transport files (.XPT). The SAS transport format allows data files to be extracted on Windows-, UNIX-, or Macintosh-based systems (this tutorial focuses only on Windows-based systems). To use these transport files, you need to create folders in which to save them, download the data files and documentation, and then extract and save NHANES data files in a SAS-accessible library.
Although SAS is not required for mastering the content of this tutorial, it does need to be installed if you plan to download and use the data files on your own computer to run the example code provided.
You will create folders to save your data files, documentation, and extracted SAS datasets. This folder structure will help keep your transport files and datasets organized.
You will need to download the NHANES data transport files to create your analytic dataset, and you will need the documentation for reference as you conduct your analysis.
- Key Concepts about Downloading Data Files and Documentation
- How to Download Data Files and Documentation
After downloading the SAS transport files, you will need to extract the data and save them as SAS datasets in a SAS-accessible library. A library is a folder that you designate on your computer to store your SAS files. Transport files are not usable without completing this task.
- Key Concepts about Extracting and Saving NHANES Data Files in Permanent Libraries
- How to Extract and Save NHANES Data Files in a SAS-Accessible Library