Below is a listing of all the sample code and datasets used in the NHANES I tutorial. They are organized by module and then task. If a module or task is not listed it is because it did not have a related program. All programs are SAS programs (i.e. SAS Survey Procedures or SAS-callable SUDAAN) and the datasets are SAS datasets for Windows.
Program code used in this tutorial follow procedures available in SAS 9.1 or SAS 8.0 and SUDAAN 9.0 or SUDAAN 8.0.
These programs use variable formats listed in the Tutorial Formats page. You may need to format the variables in your dataset the same way to reproduce results presented in the tutorial.
A regular left-click may not download the SAS datasets or SAS code correctly. Your browser may try to open and attempt to interpret the contents of the dataset or program. If this happens, right-click the link and save the dataset or program to your hard drive. After it has downloaded, the use your statistical software program to open the dataset to view it.
Download Data Files
- Task 3: How to Run the SAS Code to Create the SAS Data Files in a Permanent Library
Keep & Merge Datasets
- Task 1: How to Keep NHANES I Data
- Task 2: How to Merge NHANES I Data
Clean & Recode Data
- Task 1: Identify, Recode, and Evaluate Missing Data
- Step 1 Identify missing and unavailable values
- Step 2 Recode unavailable values as missing
- Step 3 Evaluate extent of missing data
- Task 3: Check Distributions and Describe the Impact of Influential Outliers
- Step 1 Check distributions by running a univariate analysis
- Step 2 Plot a graph of survey weight against the distribution of the variable
- Step 3 Identify outliers and compare estimates with outliers deleted against the original estimates with outliers included
- Program to Create Dataset Without Outliers and Output Means of Both Datasets
- Output of means of both datasets with and without outliers
- Dataset with outliers
- Dataset without outliers
- Task 4: Recode Variables
- Step 1 Recode based on alternate definitions
- Step 2 Check recodes