National Health and Nutrition Examination Survey

Data Quality Flag Summary Table for the Physical Activity Monitor (PAM) Data Collected in NHANES 2011-2014 and NNYFS

First published: October 31, 2022

PAXFLGSM1 Code Used in the Variable DATA_QUALITY_FLAG_CODE3 Description
Code Codebook Description2
A Occurrence of spikes on x-axis COUNT_SPIKES_X Flag is triggered if the absolute difference between two consecutive samples is greater than or equal to 11 g on the respective axis.

This flag counts spikes at the minute level, so multiple spikes in the same minute will be grouped into one flag with the start time of the first spike and the end time of the last spike noted in the “START_TIME” and “END_TIME” fields. The number of spikes in a minute is reported in “DATA_QUALITY_FLAG_VALUE”.
B Occurrence of spikes on y-axis COUNT_SPIKES_Y
C Occurrence of spikes on z-axis COUNT_SPIKES_Z
D Occurrence of maximum g_values on the x-axis COUNT_MAX_G_VALS_X Flag is triggered if the count of the max-g values occurring in any axis is greater than or equal to 690 times in the minute (~14%, or 8.6 seconds, of the minute). This value was based on motion testing of a hand-held device at Northeastern University aimed at producing contiguous max g values to establish a threshold that was confidently beyond the movement a person could naturally generate. The max-g value is defined as any value greater than 5.95 g (i.e., near or above the maximum g value measured by the device (+6 g)).
E Occurrence of maximum g_values on the y-axis COUNT_MAX_G_VALS_Y
F Occurrence of maximum g_values on the z-axis COUNT_MAX_G_VALS_Z
G Occurrence of minimum g_values on the x-axis COUNT_MIN_G_VALS_X Flag is triggered if the count of the min-g values occurring in any axis greater than or equal to 690 times in the minute (~14%, or 8.6 seconds, of the minute). The min-g value is defined as any values less than -5.95 g (i.e., near or below the minimum g value measured by the device (-6 g).
H Occurrence of minimum g_values on the y-axis COUNT_MIN_G_VALS_Y
I Occurrence of minimum g_values on the z-axis COUNT_MIN_G_VALS_Z
J Occurrence of contiguous maximum g_values on the x-axis X_CONTIGUOUS_MAX_G Flag is triggered if at any point during the minute there are samples belonging to a continuous string of max-g values that is 160 samples or longer (~3%, or 2 seconds, of the minute) in any axis. This value was based on motion testing of a hand-held device at Northeastern University aimed at producing contiguous max g values to establish a threshold that was confidently beyond the movement a person could naturally generate. One test yielded a continuous string of 60 samples. Conservatively, a 2-second threshold was used to prevent any possibility of eliminating true human movement. See footnote on CONTIGUOUS flag4 for additional details.
K Occurrence of contiguous maximum g_values on the y-axis Y_CONTIGUOUS_MAX_G
L Occurrence of contiguous maximum g_values on the z-axis Z_CONTIGUOUS_MAX_G
M Occurrence of contiguous minimum g_values on the x-axis X_CONTIGUOUS_MIN_G Flag is triggered if at any point during the minute there are samples belonging to a contiguous string of min-g values that is 160 samples or longer (~3%, or 2 seconds, of the minute) in any axis. The contiguous string of samples can go beyond the current minute. The thresholds were established in the same way as the MAX_G thresholds above. See footnote on CONTIGUOUS flag4 for additional details.
N Occurrence of contiguous minimum g_values on the y-axis Y_CONTIGUOUS_MIN_G
O Occurrence of contiguous minimum g_values on the z-axis Z_CONTIGUOUS_MIN_G
P Occurrence of contiguous impossible g_values for gravity (i.e., zero g for gravity) CONTIGUOUS_IMPOSSIBLE_G Flag is triggered when the device is not moving, according to raw accelerometer data (<0.01 g change per axis) and the vector magnitude of the x, y, and z axes is >1.25 g (i.e., the gravitational component exerted on a non-moving device is unrealistic), for at least seven contiguous samples (i.e., ~88 milliseconds). Samples in these contiguous sequences will not contain g values with a magnitude of ±6 g. See footnote on CONTIGUOUS flag4 for additional details.
Q Occurrence of contiguous adjacent zero values on the z-, y-, or z-axis CONTIGUOUS_ADJACENT_ZERO_VALUES_XYZ This flag was intended to detect sequences of contiguously adjacent samples of raw device values that are (0,0,0) (i.e., all three axes are reporting 0.0 values). However, a programming error caused the code to detect only zero x-values rather than zero for x, y, and z values in that sample. The amount of data that was erroneously flagged as a result of the error is overestimated to be 0.0049% based on a random sample of 1,500 datasets. See footnote on CONTIGUOUS flag4 for additional details.
R Occurrence of contiguous adjacent identical non-zero values on the x-, y-, or z-axis CONTIGUOUS_ADJACENT_IDENTICAL_NON_ZERO_VALS_XYZ Flag is triggered when two or more contiguous samples are observed where all three axes are the same value but not zero. See footnote on CONTIGUOUS flag4 for additional details.
S Occurrence of spikes on the x-axis in 1-second intervals COUNT_SPIKES_X_1S Flag is triggered when a 1 second window of data contains 13 examples of fast (< 100 milliseconds) and large (≥ 11 g) changes in accelerometer values. Only local maximums and minimums are considered as points for potential spikes (i.e., if a time t has an x-value of 6 and at the next sample, the x-value is 5.9, the time for the x-value of 6 is tracked as the start of the spike). This flag is counted at the minute level, so multiple instances of ~1 second spikes in a given minute will be grouped into one flag with the start time of the first spike and the end time of the last spike noted in the “START_TIME” and “END_TIME” fields for that minute. The number of 1 second windows in the minute with qualified spikes flagged is reported in the “DATA_QUALITY_FLAG_VALUE” field.
T Occurrence of spikes on the y-axis in 1-second intervals COUNT_SPIKES_Y_1S
U Occurrence of spikes on the z-axis in 1-second intervals COUNT_SPIKES_Z_1S
V Adjacent measures to periods of invalid data ADJACENT_INVALID When a minute is flagged, its previous and next minute are marked as ADJACENT_INVALID. This handles edge conditions that may not otherwise be flagged by the quality control algorithm. Note: If the first minute or last minute in an hour is flagged, the last minute from the previous hour or the first minute from the next hour will not be flagged.
W Interval jump in measurements on the x-axis. INTERVALJUMP_X Flag is triggered if any interval jumps are triggered during the minute. Interval jumps means that there is a minimum of three g values occurring at least 10 times each in a second, and these three g values are at least ±0.5 g apart from one another.

The number of seconds in the minute with the interval jumps flag triggered is reported in the “DATA_QUALITY_FLAG_VALUE” field.
X Interval jump in measurements on the y-axis. INTERVALJUMP_Y
Y Interval jump in measurements on the z-axis. INTERVALJUMP_Z

1 Variable in the minute summary files (i.e., PAXMIN_G, PAXM_G_R, PAXMIN_H, Y_PAXMIN, and C_PAXMIN) indicate the flag(s) triggered during quality review for measurements in that minute.

2 Brief code description included in the documentation codebook for the minute summary files.

3 Variable in data quality control files (i.e., [SEQN]_Logs.csv) for the raw data collected through the PAM component indicating the data issue identified by the quality control checks (i.e., a quality review flag was triggered).

4 For CONTIGUOUS flags, an integer value is reported in the “DATA_QUALITY_FLAG_VALUE” field to indicate the longest sequence of contiguously adjacent samples of raw acceleration values that are in a minute or overlap across minutes that meet the flag’s definition. For example, in the case of CONTIGUOUS_ADJACENT_IDENTICAL_NON_ZERO_VALS_XYZ, if the current minute is in the middle of a ten-minute (i.e., 48,000 sample) sequence of contiguous (5,5,5) samples, then this flag’s value will be 48,000. In addition, due to a software error, in data quality control files (i.e., [SEQN]_Logs.csv), only the maximum contiguous sequence identified for a given minute is guaranteed to be flagged. For example, there is a 5-minute contiguous sequence spread across 6 minutes, starting from the 51st second in Minute #1 and ending at the 10th second of Minute #6. Thus, Minute #6 only has a 10-second sequence that is part of this 5-minute contiguous sequence. However, minute #6 also has a separate 20-second sequence that occurs later. Due to this error, only the maximum sequence (the 5-minute sequence) is guaranteed to be flagged.