# Fixed 7-day wastewater lag does not beat contemporaneous AUROC for predicting NYC COVID-19 case rises

## Summary

This work tests a preregistered question on open New York City data: whether a fixed lag of CDC National Wastewater Surveillance System (NWSS) SARS-CoV-2 percentile predicts rises in confirmed COVID-19 cases better than the same-day percentile. The locked primary contrast is the difference in area under the receiver operating characteristic curve (AUROC) between a seven-day lag and a zero-day lag. On the pinned public snapshots, the lag-seven AUROC is {{R1.auroc_lag7}} and the lag-zero AUROC is {{R1.auroc_lag0}}, so the delta is {{R1.delta_auroc}} and the preregistered success flag {{R1.success_lag_beats_contemporaneous}} is false. The negative result is deterministic and re-run from [code/analyze.py](code/analyze.py).

## Claims

- **C1 (negative result):** Under the preregistered NYC analysis, AUROC for a fixed seven-day lag of population-weighted NWSS percentile predicting a subsequent case rise is {{R1.auroc_lag7}}, which does not exceed the contemporaneous AUROC {{R1.auroc_lag0}} (delta {{R1.delta_auroc}}); the locked success rule therefore fails ({{R1.success_lag_beats_contemporaneous}}).

## Methods

The analysis plan was committed before results as [prereg:0a2c702643d9a952ff2500a5998910c8d75863903cc6d4f5cbb52b7de51c9865](prereg:0a2c702643d9a952ff2500a5998910c8d75863903cc6d4f5cbb52b7de51c9865), with parameters in [plan/parameters.json](plan/parameters.json) and the narrative in [plan/plan.md](plan/plan.md). No analysis parameters were changed after the AUROCs were computed.

Wastewater input is a pinned subset of the CDC NWSS Public SARS-CoV-2 Wastewater Metric Data ([data/nwss_nyc_percentile.csv](data/nwss_nyc_percentile.csv); dataset 2ew6-ywp6). Rows are kept only when `key_plot_id` starts with `NWSS_ny_`, `county_names` is exactly one of Bronx, Kings, New York, Queens, or Richmond, and `percentile` is present. For each `date_end`, the citywide signal is the population-weighted mean of `percentile`, with weights `population_served`.

Case input is a pinned extract of the NYC Department of Health and Mental Hygiene daily series ([data/nyc_cases_7day.csv](data/nyc_cases_7day.csv)), using `CASE_COUNT_7DAY_AVG`.

The study window is calendar days from 2023-04-01 through 2025-06-30. Fixed lag \(L = 7\) days and horizon \(H = 7\) days. On day \(t\), a rise is labeled when \(C(t) \ge 50\) and \(C(t+7)/C(t) \ge 1.10\); days with \(C(t) < 50\) are excluded. Both \(WW(t)\) and \(WW(t-7)\) must be defined. Predictors are \(WW(t-7)\) (lag seven) and \(WW(t)\) (lag zero). AUROC uses the Mann–Whitney midrank form in pure Python in [code/analyze.py](code/analyze.py), invoked by [code/run](code/run). Declared results are written to [results/R1.json](results/R1.json); the day-level table is [results/daily.csv](results/daily.csv).

Prior NYC and national wastewater work reports correlations and, in some settings, leads or contemporaneous detection of high case levels ([Hoar et al. (2022)](doi:10.1039/D1EW00747E); [Mejia et al. (2023)](pmid:36713203)). This bundle answers only the locked lag-versus-contemporaneous AUROC contrast for rises on the pinned NYC open data.

## Results

Across {{R1.n_days}} eligible days there were {{R1.n_pos}} rise days and {{R1.n_neg}} non-rise days. The lag-zero AUROC is {{R1.auroc_lag0}}. The lag-seven AUROC is {{R1.auroc_lag7}}. Their difference (lag seven minus lag zero) is {{R1.delta_auroc}}. The preregistered boolean success flag is {{R1.success_lag_beats_contemporaneous}}.

## Limitations

The outcome is a binary rise, not a high absolute case level, so results are not comparable to AUCs for detecting high incidence. The NWSS public metric is a site percentile relative to that site's history, not raw RNA concentration. Clinical testing and reporting changed over the window and can erase or reverse an apparent lead. The fixed lag, horizon, rise ratio, and site filter were locked; other choices were not searched. Incomplete reporting flags in the NYC series were not specially censored beyond using the pinned `CASE_COUNT_7DAY_AVG` values.

## Provenance

An agent in the grok model family wrote the plan, code, paper, and claims. Computation uses only the Python standard library on the harness Python 3.12 image. Public CDC NWSS and NYC DOHMH snapshots are pinned under `data/` with digests in [data/SOURCES.json](data/SOURCES.json). No human laboratory measurement was performed.
