Panel Kernel Density Estimation
Also known as: Panel KDE, longitudinal kernel density estimation, repeated-measures KDE, panel nonparametric density estimation
Panel Kernel Density Estimation (Panel KDE) extends the standard kernel density estimator to panel (longitudinal) data, estimating smooth density surfaces for spatial or attribute variables observed across multiple units and time periods. It reveals how the distribution of a phenomenon shifts, concentrates, or disperses over time and across groups, making it a natural tool for tracking spatial patterns in repeated-measures or panel datasets.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use Panel KDE when you have a spatial or continuous variable measured repeatedly across the same units or locations and you want to track how the probability density (concentration of activity) evolves over time or across groups — for example crime counts in city districts over years, air-pollutant concentrations at monitoring stations across seasons, or house-price distributions across urban sub-markets over decades. Panel KDE is ideal when no parametric distributional assumption is warranted and the goal is exploratory or visual. Do not use it when you need causal inference or regression coefficients; when the panel is very short (T < 3) the temporal comparison is trivial; or when observations per period are too few (n < 30 per slice) to support a reliable density estimate.
Strengths & limitations
- Fully nonparametric: no distributional assumption is imposed on the data within each panel slice.
- Produces an interpretable, continuous density surface that can be overlaid on maps or compared visually across periods.
- Sensitive to clustering, multi-modality, and shifting hotspots that parametric summaries (means, variances) would miss.
- Flexible pooling strategies allow borrowing strength across sparse panels while retaining period-specific estimates.
- Widely implemented in spatial statistics software (R: spatstat, ks; Python: scipy, KDEpy; ArcGIS Kernel Density tool).
- Bandwidth choice strongly influences the result; there is no universally optimal selector for panel data, and naive use of Silverman's rule can over-smooth multimodal distributions.
- Inference (formal testing of distributional change across periods) requires bootstrap or permutation procedures that add computational cost.
- Edge effects at the boundary of the study area bias density estimates unless boundary correction is applied.
- Does not produce regression coefficients or causal estimates; it is descriptive, not explanatory.
- Computationally intensive for very large spatial panels (millions of observations per period).
Frequently asked
How is Panel KDE different from standard KDE?
Standard KDE produces a single density surface from one sample. Panel KDE applies KDE repeatedly to data organised by panel index (time period, group, or both), producing a sequence or set of surfaces that can be compared. The core estimator is the same; the added complexity lies in bandwidth harmonisation and temporal comparison.
How do I choose the bandwidth for panel data?
A common approach is to select a single bandwidth via cross-validation on the pooled dataset and apply it to all panels so the surfaces are comparable. Alternatively, adaptive bandwidths that adjust to local density can be applied per panel. Avoid using the default rule-of-thumb if your distributions are multimodal or if panel sizes differ substantially.
Can I formally test whether the density has changed between periods?
Yes. Bootstrap-based tests of the integrated squared difference between two density surfaces (f_t and f_{t-1}) provide a formal significance test. Permutation approaches that shuffle period labels also work. Software packages such as R's ks and spatstat provide these routines.
What if some panels have very few observations?
Sparse panels produce unreliable density estimates even with optimal bandwidths. Consider pooling adjacent periods, using an adaptive bandwidth that widens in low-density regions, or applying a mixed-effects density smoother that borrows strength from other panels.
Is Panel KDE the same as space-time KDE?
They overlap but differ in emphasis. Space-time KDE simultaneously smooths over both geographic space and time using a single joint kernel, treating the time dimension as a continuous axis. Panel KDE treats time as discrete panel index and produces separate spatial density surfaces per period, which are then compared. Panel KDE is more natural when periods correspond to discrete policy regimes, years, or survey waves.
Sources
- Parzen, E. (1962). On estimation of a probability density function and mode. Annals of Mathematical Statistics, 33(3), 1065-1076. DOI: 10.1214/aoms/1177704472 ↗
- Silverman, B. W. (1986). Density Estimation for Statistics and Data Analysis. Chapman and Hall, London. ISBN: 978-0412246203
How to cite this page
ScholarGate. (2026, June 3). Panel Kernel Density Estimation. ScholarGate. https://scholargate.app/en/spatial-analysis/panel-kernel-density-estimation
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Local Kernel Density EstimationSpatial analysis↔ compare
- Panel Hot Spot AnalysisSpatial analysis↔ compare
- Panel Spatial AutocorrelationSpatial analysis↔ compare
- Panel Spatial RegressionSpatial analysis↔ compare
- Space-Time Kernel Density EstimationSpatial analysis↔ compare