National Health and Nutrition Examination Survey

NHANES Tutorials

The Continuous NHANES Tutorials were updated in December 2021. A new Module 6 provides sample code using SUDAAN, SAS survey procedures, Stata, and R for select NCHS publications.

Page Description

Module 1: Datasets

The NHANES website is the most important data source and analytical resource for all data users. The website contains both historic and current datasets, and covers a wide range of critical topics. This module describes how Continuous NHANES data and documentation are structured and organized.

Module 2: Sample Design

NHANES uses a complex, multistage, probability sampling design. Researchers need to take this into account in their analyses by appropriately specifying the sampling design parameters. This module provides an overview of the sample design parameters in NHANES.

Module 3: Weighting

This module addresses why weights are created and how they are calculated, the importance of weights in making estimates that are representative of the U.S. civilian non-institutionalized population, how to select the appropriate weight to use in your analysis, and when and how to construct weights when combining survey cycles.

Module 4: Variance Estimation

This module introduces the basic concepts of variance (sampling error) estimation for NHANES data. You will learn how the complex survey design of NHANES and clustering of the data affect variance estimation, which methods are appropriate to use when calculating variance for NHANES data, how to properly calculate the variance for subgroups of interest, and how to specify the sampling design parameters in common statistical software packages (SUDAAN, SAS, Stata, and R).

Module 5: Reliability of Estimates

Analysts must evaluate the statistical reliability of estimates to determine whether the results are appropriate for their intended research objective. This module describes a number of measures that can be used to evaluate the reliability of an estimate, including the effective sample size, the design effect, the width and relative width of its confidence interval, the degrees of freedom, and the relative standard error.

Module 6: Sample Code

This module provides sample SAS, SUDAAN, Stata, and R code (see module Matrix) for generating an analytic dataset, descriptive statistics, hypothesis testing (including confidence intervals and regression analysis), age standardization, and population counts for select NCHS publications using NHANES data.

Software Tips

This page contains tips for using SUDAAN, SAS Survey, Stata, and R software to analyze NHANES data.

To report problems or comments, use the NHANES Web Tutorial email. Do not direct questions to this email address, as it can only receive feedback and we will not be able to reply.