Skip directly to search Skip directly to A to Z list Skip directly to navigation Skip directly to site content Skip directly to page options
CDC Home

NHANES Dietary Web Tutorial

Preparing a Dietary Analytic Dataset

Dietary data are among the most complex of all the data in NHANES.  For this reason, preparing a dataset for dietary analysis is an especially critical set of steps and often may be more time-consuming than the analysis itself. 

Analysts working with NHANES dietary data frequently want to be able to answer the following types of questions:

  • What is the mean intake of a given food?

  • What is the mean intake of a given nutrient from all foods and beverages?

  • What is the mean intake of a given nutrient from supplements?

  • Which foods are the major sources of a given nutrient?

  • What is the distribution of intake of a given food or nutrient across a selected population?

  • How does dietary intake relate to some health parameter?

To conduct these analyses, you will first need to know how to successfully complete the tasks described in the following modules of the Preparing an Analytic Dataset course:

Module 6.  Locate Variables

Module 7.  Download Data Files

Module 8.  Merge & Append Datasets

Module 9.  Review Data & Create New Variables

Module 10.  Format & Label Variables

Module 11.  Save a Dataset

As you work your way through these modules, and eventually prepare your own analytic dataset, it is useful to keep in mind three issues that add to the challenge of dietary data analysis—the unit of analysis, variable definitions, and the inferred population.  All of these issues require that you think very specifically about your research question.

 

Info iconIMPORTANT NOTE

This tutorial uses the SAS convention of using the term "variable" to refer to a field in a dataset.

  • One of the reasons that dietary data are so complex is because the unit of analysis may vary.  The basic unit of analysis in NHANES is the individual participant, identified by the variable SEQN.  However, because of the way the dietary data are structured—with individuals having multiple food and dietary supplement records, which in turn have their own accompanying sets of variables—the unit of analysis for some types of analyses is at the level of the food or supplement, rather than the individual. 

  • Dietary data also are challenging to work with because many analyses require the creation of new variables from variables that are found in the survey data files.  For example, if you are interested in finding the answer to the question “What is the mean intake of milk among survey participants?,” the way you define “milk” (e.g., all types of fluid milk consumed as a beverage, or milk also consumed as an ingredient in other foods, or servings of milk as defined by the guidance in MyPyramid) may require you to create several new variables based on your analytic needs.

 

Info iconIMPORTANT NOTE

The modules in this course require some basic knowledge of statistics as well as statistical software (e.g. SAS and SUDAAN) and programming.

 

Before you get started

If you have questions about this tutorial as a whole:

  • Check out the Dietary Data Tutorial Roadmap to orient yourself to the tutorial’s content.

  • Read the Introduction to find answers to frequently asked questions about NHANES dietary data and this tutorial.

  • Browse through the Logistics section to learn about the web layouts and templates used in the tutorial and find out the basic knowledge and skills you’ll need to use the tutorial.

  • Go to Technical & Software Requirements for information about what’s required to view the tutorials correctly and run the sample programs properly. This section also is the place to go if you need help with technical problems.

 

Sample Code

Abbreviated SAS and SUDAAN code is presented throughout the tutorial for the sole purpose of demonstrating and explaining specific steps in an analysis. The abbreviated code does not comprise a complete SAS or SUDAAN program that can be readily submitted for a computer run. If you need the complete SAS or SUDAAN program, please consult the Additional Resources section of this tutorial.

 

Before you get started

  • Check out the Dietary Data Tutorial Roadmap to orient yourself to the tutorial’s content.

  • Read the Introduction to find answers to frequently asked questions about NHANES dietary data and this tutorial.

  • Browse through the Logistics section to learn about the web layouts and templates used in the tutorial and find out the basic knowledge and skills you’ll need to use the tutorial.

  • Go to Technical & Software Requirements for information about what’s required to view the tutorials correctly and run the sample

programs properly.  This section also is the place to go if you need help with technical problems.