# Analysis plan: depressive symptoms, 24-hour activity rhythm entrainment and hour-to-hour critical slowing (NHANES 2011-2014)

## Question

If depression involves desynchronisation from shared daily clocks (social zeitgeber accounts) and a slowed, less flexible system (critical slowing), people with more depressive symptoms should show weaker coupling of activity to the 24-hour day, more fragmented activity, a flatter day-night contrast, and more persistent hour-to-hour deviations from their own daily pattern.

## Data

NHANES 2011-2012 and 2013-2014 public files from the CDC (fetched by digest): hourly wrist accelerometry (PAXHR, MIMS units), device header (PAXHD), demographics (DEMO) and PHQ-9 (DPQ). Adults aged 20 or over with all nine PHQ-9 items and a usable device record (PAXSTS = 1).

## What was seen before registering

Variable names and the first rows of each file; that rows in PAXHR are consecutive clock hours from the recording start (PAXSSNHP counts 80-Hz samples); and a run of `code/rhythm.py` with PHQ totals permuted across participants, which yields 5,855 adults with at least four complete valid days (median six), 549 with PHQ-9 of 10 or more, and no missing metrics. Abstracts of earlier analyses of these cycles (activity volume and depressive symptoms; 24-hour activity patterns; rhythm profiles in older adults) were read; none reported these four measures against PHQ-9 in all adults. No metric was related to real PHQ scores.

## Measures (`code/rhythm.py`)

Valid hour: 60 recorded minutes with at most 10 minutes non-wear or unknown and at most 10 quality-flagged minutes. Valid day: all 24 clock hours valid; participants need at least four. From hourly MIMS over valid days:

- interdaily stability (IS);
- intradaily variability (IV), over consecutive valid hours;
- relative amplitude (RA = (M10 − L5)/(M10 + L5)) of the mean 24-hour profile;
- AR1: the lag-1 autocorrelation of log(1 + MIMS) after removing the person's mean 24-hour profile, over consecutive valid hours;
- mean hourly activity.

## Tests

Rank regressions with HC3 errors of each metric on PHQ-9 total, adjusting for age, age², sex, survey cycle and exam period (November-April versus May-October).

**Primary, one-sided, Holm across four:** IS lower, IV higher, RA lower, AR1 higher with more symptoms. Supported at Holm p < 0.05.

**Secondary:**
- each primary adjusted for mean activity, which separates rhythm from volume;
- PHQ × age interaction (ageing);
- PHQ-9 of 10 or more versus less than 5 (AUC);
- mean activity on PHQ.

## Limits stated in advance

Cross-sectional; wrist activity is a proxy for rest-activity rhythm; hourly resolution limits fragmentation measures; depression and low activity share causes such as illness and medication; AR1 of residual activity may reflect sleep structure as much as dynamical slowing; survey weights are not used.
