correlate
Compute Pearson or Spearman correlation between two Garmin metrics, with optional time lag to find strongest relationship and Bonferroni-adjusted p-value.
Instructions
Pearson/Spearman correlation between two metrics (default: last 30 days).
Positive lag_days pairs metric_a on day D with metric_b on D+lag;
scan_lags=True searches lags -7..+7 for the strongest relationship and
returns it with a Bonferroni-adjusted p-value; if that is >= 0.05, note
says the lag may be chance and a wider range is needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| start | No | ||
| lag_days | No | ||
| metric_a | Yes | ||
| metric_b | Yes | ||
| scan_lags | No |