CDC en Español

Search:
National Center for Health Statistics  Monitoring the Nation's Health

NHANES Dietary Web Tutorial

  • Email this page

Download Data Files

Purpose

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.

 

Task 1: Create Folders

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.

 

Task 2: Download Data Files and Documentation

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.

 

Task 3: Extract and Save NHANES Data Files in a SAS-Accessible Library

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.

 

Page Last Modified: November 21, 2008

Basic Dietary Analyses

Advanced Dietary Analyses

Additional Resources

National Center for Health Statistics
3311 Toledo Road
Hyattsville, MD 20782
Phone: 1-866-441-NCHS (6247)
For data inquiries, use
nchsquery@cdc.gov

 

Problems or comments about the Tutorial?
Email the Tutorial Team: NHANESWebTutorial@cdc.gov

Safer Healthier People

Centers for Disease Control and Prevention, 1600 Clifton Rd, Atlanta, GA 30333, U.S.A
Tel: (404) 639-3311 / Public Inquiries: (404) 639-3534 / (800) 311-3435