lenatriestounderstand

Chapter 9 of 25

Time series vs panel data — what stacking series actually changes

Created May 27, 2026 Updated May 27, 2026

In ML, people often call both cases "time series forecasting." Here I use single-series for one entity and panel for many entities over time.

A single-series time series is one entity observed over time — one stock price, one server's CPU load, one country's monthly inflation. The data shape is (time, value). Forecasting models work on the temporal structure of that one series.

Panel data (also called longitudinal data in some fields) is many entities observed over time — daily sales for thousands of products, monthly inflation across hundreds of countries, CPU load for every server in a fleet. The data shape is (entity, time, value) — a second dimension joins time.

The thing that actually changes when you go from one series to many is unit-level heterogeneity: every entity has its own level, its own variance, its own slope, possibly its own seasonality. The model now has to decide what's shared across entities and what's specific to each.

Panel data also creates a statistical choice: do we want to estimate one population-level pattern, many entity-specific patterns, or some partial pooling between the two?

Four modeling strategies fall out of that decision:

  • Per-entity (local) models — fit a separate ARIMA / Prophet / N-BEATS per entity. No information sharing. Works when each entity has enough history to estimate its own parameters and when entities really are independent.
  • Fixed-effects / random-effects regression — econometric workhorses. Fit a shared model but allow per-entity intercepts (fixed effects) or per-entity offsets drawn from a distribution (random effects). The simplest version shares slopes while allowing levels to differ; richer versions can also let slopes vary by entity.
  • Global neural models (DeepAR, TFT, N-BEATS in global mode) — one model trained across all entities, with entity identity as a feature or learned embedding. Information shares across similar entities. Cold-start can work better when the new entity has some history, useful static features (category, region, price tier), or belongs to a population the model has learned from — not a substitute for any history at all.
  • Foundation models / zero-shot forecasters — Chronos / Chronos-Bolt (via AutoGluon-TimeSeries for per-series panel inference), Chronos-2, TimeGPT (Nixtla), Moirai, TimesFM, Lag-Llama. Pretrained on large collections of time series, so they can forecast a panel of new entities without per-entity training. Especially useful when many entities have short or noisy histories — the model brings prior knowledge from related-looking series it has already seen. Important nuance: many foundation forecasters handle panels operationally (batch many series through one model), but they don't always model interactions between entities — often they apply a pretrained prior to each series independently or with limited cross-series conditioning. For settings where entity-to-entity dependence carries real signal, you need a model explicitly designed to condition across entities, use shared covariates, or model cross-sectional dependence — not just a model that can batch many series.

What people often miss when switching from time series to panel data:

  • Error structure gets harder. In a single-series model, the main dependence the model has to handle is temporal — today is related to yesterday. In panel data, errors can also be correlated across entities at the same timestamp: a market shock hitting all stocks, a regional outage hitting many servers, a promotion affecting many products. If the model treats every entity as independent — including most off-the-shelf TS libraries used per-series — uncertainty estimates and validation results can look cleaner than reality.
  • Aggregation is not the answer. Averaging the per-entity series into one "mean series" then forecasting that throws away the variance information and Simpson's-paradox effects you'd otherwise see. You may forecast the aggregate if the aggregate is the only business target, but you cannot recover entity-level behaviour from it afterward.
  • The right cross-validation changes. TS cross-validation walks forward in time on one series. Panel CV has to walk forward in time across all entities simultaneously, and sometimes also leave-one-entity-out for generalisation tests.
  • Hierarchical reconciliation is its own thing. Sales forecasts per product → per category → per region need to add up at every level. Simple reconciliation strategies include bottom-up, top-down, and middle-out. More statistical approaches, such as MinT, adjust forecasts using the estimated forecast-error covariance so the hierarchy stays coherent.

The univariate / multivariate / panel distinction is also covered from a different angle in Univariate vs multivariate time series.

Full breakdown — exact data shapes, exogenous variables, panel layout, the storage and modeling implications: see Time Series Data: Univariate, Multivariate, Panel, and Exogenous Variables.