Preparing a Physical Activity Monitor Dataset
Purpose
Module 7 illustrates the basic principles for preparing a physical activity monitor dataset. We encourage you to approach the following tasks in sequence so that you replicate the steps taken by an NHANES analyst. To help guide you through this process, we’ve created a SAS program entitled “PAXMSTR.SAS” that demonstrates how to use the physical activity monitor data to calculate mean total counts per day, mean counts/min per day, and time above specified intensity thresholds for study participants. Investigators interested in physical activity monitor data commonly analyze these metrics. Our dataset will contain these calculated metrics for each NHANES 2003-2004 and 2005-2006 participant with the necessary accelerometer data for the calculations.
When you have completed the tutorial and want to prepare a dataset for your own analysis, you may choose to perform an analysis that summarizes the physical activity monitor data in a different way. You can still use this SAS program and tutorial as a framework for preparing your dataset and building your own analysis.
The SAS codes and data files are applicable to the 2003-2006 NHANES data only. These SAS codes will not work for 2011-2014 physical activity monitor data due to significant changes in data collection.
Task 1: Locate Variables
Physical activity monitor data files and supporting documentation are stored in the Examination section of the NHANES website. This task will teach you how to identify physical activity monitor variables, appropriate sample weights, and their file locations.
Identify Physical Activity Monitor Variables and File Locations
- Key Concepts about Identifying Physical Activity Monitor Variables and File Locations
- How to Identify Physical Activity Monitor Variables and File Locations
Identify Correct Sampling Weights and File Locations
- Key Concepts about Identifying Correct Sampling Weights and File Locations
- How to Identify Correct Sampling Weights and File Locations
Task 2: Download Data
To organize your data most effectively, it is helpful to create folders in which to save your data files, documentation, and extracted SAS datasets.
Create a Directory
Download Data Files and Supporting Documentation
- Key Concepts about Downloading Data Files and Supporting Documentation
- How to Download Data Files and Documentation
Extract and Save Data Files
Task 3: Merge & Append Datasets
Typically, an NHANES physical activity monitor analytic dataset will include data collected during two or more cycles. You will need to merge the data to include variables from both demographic data files and physical activity monitor examination files collected within the same cycle and append the data to combine years of data from multiple cycles.
- Key Concepts about Merging & Appending NHANES Data for Physical Activity Monitor Analyses
- How to Merge & Append NHANES Data for Physical Activity Monitor Analyses
Task 4: Review Data & Create New Variables
Before you can use the variables in the physical activity monitor dataset, you will need to review the data and create new variables.
Evaluate Missing Data
Create New Variables
- Key Concepts about Creating New Variables for Physical Activity Monitor Analyses
- How to Use a SAS Macro Designed to Define Periods of Monitor Wear or Non-Wear
- How to Create Variables that Classify the Intensity of Each Minute in the Physical Activity Monitor Data
- How to Use a SAS Macro Designed to Summarize Bouts of Activity at Defined Intensities
Create Summary Metrics
- Key Concepts about Creating Person-level Summary Metrics
- How to Create Custom Formats to Describe Physical Activity Monitor Data
- How to Select Study Participants to Include in Your Analyses
- How to Create Person-level Summary Metrics
Check Distributions and Describe the Impact of Influential Outliers
- Key Concepts about Outliers in NHANES Data
- How to Identify and Describe the Impact of Influential Outliers
Task 5: Save a Dataset
In this module, you will learn how to create a permanent dataset in a SAS library. This will allow you to save the temporary dataset that you have been working with as a permanent file on your computer so you can continue your work at a later time.
Contact Us:
- National Center for Health Statistics
3311 Toledo Rd
Hyattsville, MD 20782 - 1 (800) 232-4636
- cdcinfo@cdc.gov