Analysis Page¶
The Analysis page is where you build your own charts by hand: pick one or more metrics, a date range, and Cohearence plots them together and computes statistics across them.
What you can control¶
- Metrics — select any combination from your library; each gets its own color and chart style.
- Date range — quick presets (7 days, 30 days, all-time, …) or a custom start/end.
- Resampling & aggregation — roll daily data up to weekly or monthly, choosing how points are aggregated (mean, sum, and so on). If your requested resolution would produce too many points to plot cleanly, Cohearence automatically falls back to a coarser one and lets you know.
- Normalization — put metrics with very different scales (say, sleep hours and mood on a 1–5 scale) on comparable axes so you can eyeball them together.
- Missing-data policy — choose how gaps are handled per metric (skip, carry forward, fill with a custom value, and similar options), rather than having a one-size-fits-all default silently applied.
- Correlation method — Pearson or Spearman, applied across whichever metrics you've selected.
Layout¶
On a wide screen (tablet, desktop, or a maximized browser window), the Analysis page opens as a side-by-side workspace — your controls stay visible next to the chart as you tune them. On a phone, the same controls stack vertically above the results.
The main chart area has two tabs:
- Traces — the multi-metric time-series chart (default).
- Regression — a scatter plot with fitted lines for one predictor (X) and one response (Y). Regression is computed only when you open this tab, so the default view stays fast.
Output sections¶
Below the chart, results are grouped into collapsible sections:
- Summary stats — per-metric average, spread, min/max, and the share of the window with no data.
- Correlations — every pair ranked by confidence-adjusted strength; tap a pair to open the lag explorer.
Regression tab¶
Pick an X (predictor) and Y (response) metric and Cohearence fits a least-squares line through the scatter of the two. The regression tab includes:
- A bidirectional lag slider — shift the response forward or backward relative to the predictor (same convention as the lag explorer on correlations).
- Three overlay lines: least-squares (OLS), LOWESS (a dashed curve tracing the data's actual shape), and Theil–Sen (a robust straight-line cross-check). Tap a legend item to hide or show that line; double-tap to show only that line.
- A residuals vs fitted plot — a structureless cloud around zero means a straight line is fair; a curve or fan shape means it isn't.
- A plain-English summary with R², autocorrelation-adjusted p, and a rate expressed per about one standard deviation of the predictor.
Time-of-day metrics (e.g. bed time) are plotted on readable clock axes. Effects on time metrics are described as shifts relative to your typical time, not absolute clock positions.
As everywhere in Cohearence, a fit describes how two metrics moved together — not proof that one causes the other.
Statistical methods¶
Cohearence uses the same statistics on the Analysis page and over MCP, so numbers match whether you read them in the app or ask your AI assistant.
Regression (least-squares fit)¶
| Method | What it is | Why we use it |
|---|---|---|
| Ordinary least squares (OLS) | Straight line minimizing squared vertical error; reports slope, intercept, Pearson r, and R² (fraction of response variance the line explains). | The standard linear summary — easy to read and comparable across metrics. |
| Slope 95% CI | Textbook interval: slope ± t(0.975, n−2)·SE. | Shows uncertainty on the rate, not just the point estimate. |
| LOWESS | Locally weighted scatterplot smoothing — short straight segments through nearby points, drawn as a dashed curve. | Reveals curvature: where LOWESS bends away from OLS, a single slope would mislead. |
| Linearity gate | Compares Pearson r (linear) with Spearman r (monotonic). If they disagree beyond a fixed tolerance, the summary withholds the single-slope claim. | OLS assumes a straight line; this gate flags monotone-but-curved relationships. |
| Theil–Sen | Median of all pairwise slopes — outlier-resistant. | A robust cross-check: a large gap from OLS suggests a few unusual days are steering the fit. |
| Autocorrelation-adjusted p | Bartlett effective sample size discounts n for each series' day-to-day persistence before testing a non-zero slope. | Daily self-tracking data is strongly autocorrelated; naive OLS p is anti-conservative. Prefer the adjusted value. |
| Predictor increment | The summary rate is per a human-friendly step snapped near one standard deviation of the predictor (e.g. "about 1 SD (10 pts) higher"), not per one raw unit. | A slope of "0.3 pts per 1 pt" is technically true but useless; SD-scaled steps match how people think about variation. |
| Lag | Shifts the response series relative to the predictor by whole resample buckets (days on the default grid). Positive lag = response follows predictor. | Lets you test delayed associations (e.g. last night's sleep vs next-morning readiness). |
| Gating | No fit below 10 overlapping points or on a constant variable. | Same floor as the correlation matrix — a scatter never shows a line the correlation view would refuse. |
Correlations (summary stats section)¶
- Spearman (default) — rank correlation; robust to outliers and captures any monotonic trend.
- Pearson — straight-line strength; sensitive to outliers.
- Lag explorer — scans lags from −k to +k with Benjamini–Hochberg FDR across the lag family so the highlighted peak is the strongest reliable lag, not just the tallest bar.
Getting started¶
Select at least one metric and tap Build to render your first chart. After that, the chart updates live as you tweak the date range, metrics, or any other control — no need to hit Build again. Open the Regression tab when you want a scatter fit for a specific pair.