mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
Rated mood factors (work / sleep-quality / stress, scored per entry) now participate in the cross-metric correlation surface. Until now their score series was captured but read by zero analytics. Two paths, both on the existing FDR-controlled engine: - A factor x vital crosstab on the mood insights page and the mood snapshot: for each factor the user scores, split its days low vs high by the factor's own median, then run the same Welch test + day floors + Benjamini-Hochberg correction the tag crosstab uses. Surfaces lines like "sleep runs ~38 min below baseline on the days you rated work low" (n-gated, q <= 0.10, never fabricated on thin data). - Factor channels (FACTOR:<key>) fold into the period-narrative discovery matrix as both lag source and lag target, so the drivers the coach and narrative reference can cite a factor relationship. An inverse factor (higher rating = worse day) gets the documented sign-flip once, at the series boundary, so "up" always reads as a better day and the low/high split and phrasing stay honest. Strings land in all six locales; the surface carries the standing "association, not cause" caption. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>