# Codebook — Dataset A: NHANES 2013–2014 Movement, Fitness and Health

This codebook describes only the variables included in the Assignment 4 data file. **n** is the number of people with a value; blank cells in the CSV are missing. **Range** is the smallest to largest value in the file.

**File:** `nhanes_2013_2014_kinesiology.csv` (10,175 rows × 84 columns; one row per person)

**Source:** CDC National Health and Nutrition Examination Survey (NHANES), 2013–2014 cycle. Public domain. https://wwwn.cdc.gov/nchs/nhanes/continuousnhanes/default.aspx?BeginYear=2013

**What it is:** A national sample of people of all ages who completed an interview, a physical exam at a mobile exam center, blood tests, and a week of wearing a wrist accelerometer. Not every measure was collected for every age; the **Who** column gives the ages measured, so a blank value often means the person was outside that age range.

**Notes**
- Refused and don't know answers are coded as missing.
- NHANES oversamples some groups. Counts and averages computed directly from the file describe the sample, not the U.S. population. To describe the population, weight each person by `exam_weight`.
- Accelerometer movement is in MIMS (Monitor-Independent Movement Summary) units. MIMS has no fixed intensity cut-points; compare people and hours with each other rather than against a threshold.
- Self-reported activity counts only activity done for at least 10 minutes continuously.

## Identifiers and survey design

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `id` | Participant ID |  | Everyone | 10,175 | 73557 to 83731 | `SEQN` |
| `exam_weight` | Sample weight for the exam. Use it to estimate values for the whole U.S. population; 0 means not examined |  | Everyone | 10,175 | 0 to 171395 | `WTMEC2YR` |

## Demographics

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `sex` | Sex | Male, Female | Everyone | 10,175 |  | `RIAGENDR` |
| `age_years` | Age at screening | years; 80 means 80 or older | Everyone | 10,175 | 0 to 80 | `RIDAGEYR` |
| `race_ethnicity` | Race and Hispanic origin | Mexican American, Other Hispanic, Non-Hispanic White, Non-Hispanic Black, Non-Hispanic Asian, Other or multiracial | Everyone | 10,175 |  | `RIDRETH3` |
| `education_adult` | Highest education | Less than 9th grade, 9-11th grade, High school graduate or GED, Some college or AA degree, College graduate or above | Ages 20+ | 5,762 |  | `DMDEDUC2` |
| `income_poverty_ratio` | Family income divided by the federal poverty line | ratio; 5 means 5 or more | Everyone | 9,390 | 0 to 5 | `INDFMPIR` |

## Body size

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `weight_kg` | Body weight | kg | Everyone | 9,723 | 3.1 to 222.6 | `BMXWT` |
| `height_cm` | Standing height | cm | Ages 2+ | 9,067 | 79.7 to 202.6 | `BMXHT` |
| `bmi` | Body mass index | kg/m² | Ages 2+ | 9,055 | 12.1 to 82.9 | `BMXBMI` |
| `waist_cm` | Waist circumference | cm | Ages 2+ | 8,661 | 40.2 to 177.9 | `BMXWAIST` |
| `upper_leg_length_cm` | Upper leg length | cm | Ages 8+ | 7,402 | 24.4 to 51.9 | `BMXLEG` |
| `arm_circumference_cm` | Upper arm circumference | cm | Ages 2 months+ | 9,301 | 10.4 to 59.4 | `BMXARMC` |

## Heart rate and blood pressure

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `resting_pulse_bpm` | Resting pulse (30-second count × 2) | beats/min | Ages 8+ | 7,549 | 40 to 180 | `BPXPLS` |
| `systolic_bp_mmhg` | Systolic blood pressure, mean of up to 4 readings | mm Hg | Ages 8+ | 7,531 | 64.7 to 228.7 | `BPXSY1–BPXSY4` |
| `diastolic_bp_mmhg` | Diastolic blood pressure, mean of up to 4 readings (readings of 0 removed) | mm Hg | Ages 8+ | 7,487 | 3.3 to 128 | `BPXDI1–BPXDI4` |

## Muscle strength

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `dominant_hand` | Dominant hand | Right, Left, Both equally | Ages 6+ | 7,807 |  | `MGD130` |
| `grip_combined_kg` | Combined grip strength: best trial of each hand added together | kg | Ages 6+ | 7,677 | 8 to 162.8 | `MGDCGSZ` |
| `grip_max_kg` | Strongest single grip trial, either hand | kg | Ages 6+ | 7,807 | 4 to 82.8 | `max of MGXH1T1–MGXH2T3` |

## Body composition (DXA scan)

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `body_fat_pct` | Whole-body percent fat | % | Ages 8–59 | 5,056 | 12.7 to 54.8 | `DXDTOPF` |
| `fat_mass_kg` | Whole-body fat mass | kg | Ages 8–59 | 5,056 | 3.33 to 91.73 | `DXDTOFAT ÷ 1000` |
| `lean_mass_kg` | Whole-body lean mass, excluding bone | kg | Ages 8–59 | 5,110 | 12.99 to 104.82 | `DXDTOLE ÷ 1000` |
| `appendicular_lean_kg` | Lean mass of both arms and both legs (used to screen for low muscle mass) | kg | Ages 8–59 | 5,087 | 4.69 to 51.07 | `DXDLALE + DXDRALE + DXDLLLE + DXDRLLE` |
| `trunk_fat_kg` | Fat mass in the trunk | kg | Ages 8–59 | 5,288 | 1.17 to 49.43 | `DXXTRFAT ÷ 1000` |
| `bone_density_g_cm2` | Whole-body bone mineral density | g/cm² | Ages 8–59 | 5,068 | 0.559 to 1.548 | `DXDTOBMD` |

## Self-reported physical activity (typical week)

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `work_vigorous_days` | Days per week of vigorous work activity | days (1–7); blank if none | Ages 12+ | 1,171 | 1 to 7 | `PAQ610` |
| `work_vigorous_min_per_day` | Minutes of vigorous work on a typical day | minutes | Ages 12+ | 1,166 | 10 to 1080 | `PAD615` |
| `work_vigorous_min_week` | Weekly minutes of vigorous work (days × minutes; 0 if none) | minutes/week | Ages 12+ | 7,141 | 0 to 6480 | `PAQ605, PAQ610, PAD615` |
| `work_moderate_days` | Days per week of moderate work activity | days (1–7) | Ages 12+ | 2,303 | 1 to 7 | `PAQ625` |
| `work_moderate_min_per_day` | Minutes of moderate work on a typical day | minutes | Ages 12+ | 2,296 | 10 to 900 | `PAD630` |
| `work_moderate_min_week` | Weekly minutes of moderate work | minutes/week | Ages 12+ | 7,133 | 0 to 5040 | `PAQ620, PAQ625, PAD630` |
| `walk_bike_days` | Days per week walking or cycling to get places | days (1–7) | Ages 12+ | 2,047 | 1 to 7 | `PAQ640` |
| `walk_bike_min_per_day` | Minutes walking or cycling for transport on a typical day | minutes | Ages 12+ | 2,040 | 10 to 840 | `PAD645` |
| `walk_bike_min_week` | Weekly minutes walking or cycling for transport | minutes/week | Ages 12+ | 7,139 | 0 to 5880 | `PAQ635, PAQ640, PAD645` |
| `rec_vigorous_days` | Days per week of vigorous sports, fitness or recreation | days (1–7) | Ages 12+ | 2,056 | 1 to 7 | `PAQ655` |
| `rec_vigorous_min_per_day` | Minutes of vigorous recreation on a typical day | minutes | Ages 12+ | 2,052 | 10 to 600 | `PAD660` |
| `rec_vigorous_min_week` | Weekly minutes of vigorous recreation | minutes/week | Ages 12+ | 7,139 | 0 to 3000 | `PAQ650, PAQ655, PAD660` |
| `rec_moderate_days` | Days per week of moderate sports, fitness or recreation | days (1–7) | Ages 12+ | 3,056 | 1 to 7 | `PAQ670` |
| `rec_moderate_min_per_day` | Minutes of moderate recreation on a typical day | minutes | Ages 12+ | 3,056 | 10 to 900 | `PAD675` |
| `rec_moderate_min_week` | Weekly minutes of moderate recreation | minutes/week | Ages 12+ | 7,140 | 0 to 4500 | `PAQ665, PAQ670, PAD675` |
| `mvpa_min_week` | Moderate-equivalent activity per week: all moderate minutes + 2 × all vigorous minutes | minutes/week | Ages 12+ | 7,120 | 0 to 14760 | `derived` |
| `meets_aerobic_guideline` | Meets the adult aerobic guideline (mvpa_min_week ≥ 150) | Yes, No | Ages 18+ | 6,095 |  | `derived` |
| `sedentary_min_day` | Minutes sitting on a typical day | minutes/day | Ages 12+ | 7,109 | 0 to 1200 | `PAD680` |
| `youth_days_active_60min` | Days in the past week active for at least 60 minutes | days (0–7) | Ages 2–15 | 2,981 | 0 to 7 | `PAQ706` |
| `tv_hours_day` | TV or video watching on a typical day, past 30 days | Does not watch, Less than 1 hour, 1 hour … 5 or more hours | Ages 2+ | 9,444 |  | `PAQ710` |
| `computer_hours_day` | Computer or video game use outside school on a typical day, past 30 days | Does not use, Less than 1 hour, 1 hour … 5 or more hours | Ages 2+ | 9,448 |  | `PAQ715` |

## Sleep, health and blood markers

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `sleep_hours_self_report` | Usual hours of sleep at night on weekdays or workdays | hours; 12 means 12 or more | Ages 16+ | 6,454 | 2 to 12 | `SLD010H` |
| `told_trouble_sleeping` | Ever told a doctor about trouble sleeping | Yes, No | Ages 16+ | 6,462 |  | `SLQ050` |
| `general_health` | Self-rated general health | Excellent, Very good, Good, Fair, Poor | Ages 12+ | 6,466 |  | `HSD010` |
| `diabetes` | Ever told by a doctor they have diabetes | Yes, No, Borderline | Ages 1+ | 9,763 |  | `DIQ010` |
| `hba1c_pct` | Glycated hemoglobin (average blood sugar over ~3 months) | % | Ages 12+ | 6,643 | 3.5 to 17.5 | `LBXGH` |
| `total_cholesterol_mg_dl` | Total cholesterol | mg/dL | Ages 6+ | 7,624 | 69 to 813 | `LBXTC` |
| `hdl_cholesterol_mg_dl` | HDL ("good") cholesterol | mg/dL | Ages 6+ | 7,624 | 10 to 173 | `LBDHDD` |

## Accelerometer: 7 days of wrist-worn movement

| Variable | Description | Units or values | Who | n | Range | NHANES source |
|---|---|---|---|---|---|---|
| `acc_valid_days` | Number of valid days: full 24-hour days with at least 10 hours of awake wear | days (1–7) | Ages 3+ who wore the monitor | 7,376 | 1 to 7 | `PAXDAY_H` |
| `acc_mims_per_day` | Total movement per day, averaged over valid days (MIMS units; more = more movement) | MIMS/day | Ages 3+ | 7,376 | 3079.2 to 33296.6 | `PAXMTSD` |
| `acc_mims_weekday` | Total movement per day on weekdays (Mon–Fri) | MIMS/day | Ages 3+ | 7,298 | 665.8 to 37400.6 | `PAXMTSD, PAXDAYWD` |
| `acc_mims_weekend` | Total movement per day on weekends (Sat–Sun) | MIMS/day | Ages 3+ | 6,798 | 3186.3 to 36520.6 | `PAXMTSD, PAXDAYWD` |
| `acc_wake_wear_min_per_day` | Minutes per day classified as awake and wearing the monitor | minutes/day | Ages 3+ | 7,376 | 600 to 1306.4 | `PAXWWMD` |
| `acc_sleep_min_per_day` | Minutes per day classified as sleep by the monitor | minutes/day | Ages 3+ | 7,376 | 0 to 805 | `PAXSWMD` |
| `acc_light_lux_per_min` | Average ambient light at the wrist (a proxy for time outdoors and light exposure) | lux | Ages 3+ | 7,376 | 0 to 973.9 | `PAXLXSD ÷ PAXVMD` |
| `acc_mims_h00 … acc_mims_h23` | Movement in each clock hour of the day (h00 = midnight–1 am, h13 = 1–2 pm), averaged over valid days. 24 columns, one per hour | MIMS/hour | Ages 3+ | 7,376 | 0 to 4376.4 | `PAXMTSH (PAXHR_H)` |

