Published content
- Language
- English
- Published
- Aug 29, 2026
- Updated
- Aug 29, 2026
Bayesian Spatiotemporal Interpretable Analysis
BSTVC: Interpreting Spatiotemporal Heterogeneity, Identifying Key Drivers, and Making Dynamic Predictions
A unified Bayesian “full-map” framework for moving from where and when effects vary, to which factors matter most, and finally to what is likely to happen next.
Author: Chao Song Format: Revised English blog edition Topic: BSTVC R package · STVC · STVPI
Spatiotemporal heterogeneity Ante-hoc interpretability Bayesian full-map modeling Dynamic prediction
Many real-world relationships are neither spatially constant nor temporally stable. The effect of an environmental exposure, a socioeconomic determinant, or a health-service factor may be strong in one place, weak in another, and may even change direction over time. Treating such relationships as globally fixed can therefore hide the very mechanisms that matter most. BSTVC was developed for this problem.
First principle
If a process changes across both space and time, interpretability should not stop at a single global coefficient. We need to know where an effect differs, when it changes, how uncertain those local effects are, and which factors account for the largest share of the variation.
1. Why spatiotemporal heterogeneity matters
Regression analysis is often used to answer a deceptively simple question: how is an outcome related to its potential determinants? In conventional global models, the answer is summarized by one coefficient for each explanatory variable. That is useful when the underlying relationship is approximately stable. But many geographic, environmental, social, and health processes are not stable in this sense.
The same risk factor may operate differently across regions because of differences in climate, population structure, infrastructure, behavior, policy, or baseline vulnerability. It may also evolve over time as environments, technologies, institutions, and populations change. This phenomenon is commonly described as spatiotemporal nonstationarity or, more broadly, spatiotemporal heterogeneity in variable relationships.
Ignoring this heterogeneity has two consequences. First, a global average effect can become scientifically misleading because it mixes different local mechanisms into one number. Second, prediction may deteriorate when a model assumes that relationships remain constant where they actually vary.
The central question is therefore not only “Does X matter?”
It is also: Where does X matter? When does it matter? How strongly? With what uncertainty? And how much of the overall spatiotemporal variation can X explain?
2. What BSTVC is designed to do
BSTVC—Bayesian Spatiotemporally Varying Coefficients—is a Bayesian modeling framework and R package for analyzing heterogeneous relationships in spatiotemporal panel and areal data. Its defining idea is to place local interpretation, global attribution, and prediction inside one coherent modeling workflow.
1
Local interpretation
Estimate how the direction and magnitude of a covariate–outcome relationship vary across spatial units and time points.
2
Global driver identification
Use spatiotemporal variance partitioning to compare the relative contribution of candidate determinants.
3
Dynamic prediction
Use heterogeneous local relationships for smoothing, missing-value estimation, and prediction under changing conditions.
Figure 1. The BSTVC analytical chain. Local spatiotemporal interpretability, global factor attribution, and prediction are treated as connected analytical targets.
3. The “full-map” idea
A core feature of BSTVC is its full-map modeling strategy. Instead of fitting unrelated local regressions independently at different places or times, the Bayesian hierarchical framework estimates the spatial and temporal components within a unified model. Spatial and temporal dependence are represented explicitly, allowing neighboring spatial units and adjacent time points to inform one another.
This matters for interpretation. Local coefficients are estimated within the same probabilistic system, so their uncertainty is propagated consistently and the resulting spatial and temporal patterns can be compared within a common framework.
Spatial heterogeneity
Captured through locally varying spatial effects while accounting for spatial autocorrelation, commonly using neighborhood-based spatial structures.
Temporal heterogeneity
Captured through time-varying effects with temporal dependence, allowing relationships to evolve rather than remain fixed.
Bayesian uncertainty
Posterior distributions provide direct uncertainty quantification for local effects and predictions, including narrow and wide credible intervals.
Model extensibility
The hierarchical formulation can be adapted to different response distributions, spatial structures, and increasingly complex spatiotemporal mechanisms.
4. Three levels of interpretability
4.1 Local spatiotemporal interpretability: where and when does an effect change?
BSTVC estimates local coefficient patterns rather than forcing one coefficient to represent an entire study region and time period. For each explanatory variable, researchers can examine space coefficients and time coefficients, together with their Bayesian credible intervals.
This turns a conventional statement such as “temperature is positively associated with disease risk” into a more informative question: in which places is the association strongest, during which periods does it intensify, and where is the posterior evidence uncertain?
4.2 Global spatiotemporal interpretability: which factors matter most?
Local maps and curves are informative, but they do not automatically tell us which explanatory variables contribute most to the overall pattern. BSTVC therefore incorporates the Spatiotemporal Variance Partitioning Index (STVPI), which translates the modeled spatial and temporal variability into interpretable contribution measures.
The purpose of STVPI is not merely to rank variables. It is to quantify their relative explainable percentage and distinguish whether a determinant contributes mainly through spatial variation, temporal variation, or both. This creates a bridge from local coefficient surfaces to global driver identification.
Figure 2. Conceptual role of STVPI. It summarizes modeled spatial and temporal heterogeneity into interpretable contribution measures.
4.3 Predictive interpretability: can better explanation improve prediction?
Prediction and interpretation are often treated as competing goals. BSTVC is built around a different premise: when heterogeneous relationships are real, modeling them explicitly can improve both scientific interpretation and predictive inference.
The package supports spatiotemporal smoothing, missing-value inference, and prediction. The key is that predictions are generated from a model that allows covariate effects to adapt across space and time rather than assuming that a single global relationship applies everywhere.
Interpretability is not added after the model.
It is encoded in the model’s parameters from the beginning.
5. What the R package supports
| Analytical target | BSTVC support | Scientific output |
|---|---|---|
| Continuous outcomes | Gaussian / log-Gaussian-style Bayesian modeling workflows, depending on data specification and package version | Local coefficients, uncertainty, fitted values, prediction |
| Binary outcomes | Logistic regression | Spatiotemporally varying associations for binary responses |
| Count outcomes | Poisson regression | Heterogeneous effects for count processes |
| Local interpretation | Spatial and temporal coefficient estimates | Maps, curves, posterior summaries, credible intervals |
| Global interpretation | STVPI and related contribution summaries | Explainable percentages and key-factor ranking |
| Prediction | Bayesian posterior prediction | Smoothing, missing-value inference, forecasting |
| Model assessment | Bayesian model diagnostics and scores | DIC, WAIC, effective complexity and logarithmic score, where available |
The framework also supports flexible spatial weight or neighborhood structures. This is important because the definition of spatial dependence should reflect the scientific setting rather than be treated as a purely technical afterthought.
6. Why BSTVC differs from conventional approaches
BSTVC is not intended to replace every global, spatial, temporal, or machine-learning model. Its value is most evident when the scientific question itself is about heterogeneous mechanisms.
| Approach | Typical strength | Limitation for heterogeneous mechanisms |
|---|---|---|
| Global regression | Simple, stable, easy to communicate | One coefficient may conceal strong local differences across space and time |
| Spatial-only local modeling | Reveals geographic nonstationarity | Does not fully describe how relationships evolve over time |
| Temporal-only modeling | Captures changing temporal effects | Can miss geographic variation and spatial dependence |
| Black-box prediction | Potentially high predictive accuracy | Interpretation is often post-hoc and may not correspond directly to model parameters |
| BSTVC | Unified local interpretation, global attribution, uncertainty, and prediction | Requires careful Bayesian specification, diagnostics, and sufficient spatiotemporal structure in the data |
A particularly important distinction is the difference between ante-hoc and post-hoc interpretability. In BSTVC, the local effects being interpreted are explicit parameters of the statistical model. The interpretation is therefore part of the data-generating model itself rather than an explanatory layer added after fitting an opaque predictor.
7. Uncertainty is part of the result
A map of estimated local coefficients can look highly detailed, but detail alone is not evidence. Bayesian modeling makes it possible to report the posterior uncertainty of each local effect directly. BSTVC therefore emphasizes credible intervals alongside point estimates.
This is especially important in sparsely observed regions or time periods, where apparent local variation may be less certain. The model can borrow information through spatial and temporal dependence while still expressing uncertainty in the posterior distribution.
Practical reading rule: never interpret a coefficient map or time curve without its uncertainty. The scientific result is the posterior distribution—not only the posterior mean.
8. Missing data and incomplete spatiotemporal panels
Real spatiotemporal datasets are rarely complete. Surveillance systems have gaps, administrative statistics may be missing for selected regions or years, and environmental covariates may not be observed uniformly.
Within a Bayesian hierarchical framework, missing outcomes can often be inferred jointly with other model quantities when the model is appropriately specified. This makes BSTVC useful for spatiotemporal smoothing and missing-value estimation, while retaining uncertainty about those inferred values.
The advantage should not be interpreted as permission to ignore data quality. Missingness mechanisms, coverage differences, measurement error, and changes in data-generating systems still need to be examined scientifically before model fitting.
9. A spatial-only companion: BSVC
Not every research question requires a full spatiotemporal model. When the main objective is to study spatially heterogeneous relationships at one time point—or when the temporal dimension is not central—the Bayesian Spatially Varying Coefficients (BSVC) formulation provides a spatial counterpart.
The same interpretive logic remains: estimate local spatial effects, quantify uncertainty, and evaluate the contribution of candidate factors. This makes BSVC useful for high-resolution regional risk assessment, spatial epidemiology, environmental exposure analysis, and other applications where geographic nonstationarity is the primary concern.
10. Where the framework is most useful
- Public health and spatial epidemiology: when exposure–response relationships, disease risks, or intervention effects differ by place and time.
- Medical and health geography: when healthcare resources, accessibility, inequality, or health outcomes evolve unevenly across regions.
- Environmental health: when pollutant, climate, or built-environment effects are geographically and temporally heterogeneous.
- Natural hazards and risk science: when environmental drivers have local spatial effects and global models oversimplify susceptibility or intensity patterns.
- Socioeconomic and population studies: when determinants operate differently across regions and historical periods.
- Any spatiotemporal panel study: when the scientific objective is not only prediction, but mechanism-oriented interpretation under nonstationarity.
11. Representative methodological lineage
BSTVC builds on a series of Bayesian local spatiotemporal modeling studies. Earlier work introduced Bayesian STVC models for detecting spatial and temporal nonstationarity in variable relationships and demonstrated their use in infectious-disease and regional health analyses. Subsequent work extended the framework and developed STVPI to quantify spatiotemporal contributions. The R package consolidates these ideas into a reproducible analytical workflow.
One important lesson from this methodological development is that the goal is not to make a model locally complex for its own sake. The goal is to introduce local variation only where it serves a clear scientific question and can be estimated with a coherent dependence structure.
12. A concise workflow for applied research
Figure 3. A practical research workflow for BSTVC studies, from defining the heterogeneous mechanism to uncertainty-aware interpretation and prediction.
- Define the scientific target. Decide whether the question concerns local heterogeneity, global driver importance, prediction, or all three.
- Structure the data. Build a spatiotemporal panel with explicit spatial IDs, temporal IDs, outcome variables, and candidate determinants.
- Specify dependence. Choose spatial neighborhood/weight structures and temporal dependence assumptions that match the study design.
- Fit the BSTVC model. Estimate local spatial and temporal effects in a unified Bayesian framework.
- Inspect uncertainty first. Evaluate credible intervals and posterior stability before interpreting detailed local patterns.
- Identify key drivers. Use STVPI or related contribution summaries to connect local heterogeneity with global factor importance.
- Evaluate predictive performance. Examine Bayesian fit and predictive scoring rather than relying on one metric alone.
- Translate results back to mechanism. Interpret where, when, and why the effect patterns make scientific sense.
13. The broader idea: from “association” to “spatiotemporal explanation”
The most important contribution of BSTVC is not a single function or diagnostic. It is a shift in how influencing-factor analysis is framed. A global coefficient answers an average question. A spatiotemporally varying coefficient asks how the relationship itself changes across the study domain. STVPI then asks how much those heterogeneous effects contribute to the broader pattern. Prediction closes the loop by testing whether the modeled heterogeneity has practical value.
Take-home message
BSTVC connects local mechanism, global importance, and dynamic prediction in one uncertainty-aware Bayesian framework. Its purpose is not simply to produce more maps, but to make spatiotemporal heterogeneity scientifically interpretable.
Offline import format. This edition intentionally uses ordinary image files only: .png / .jpg. No SVG, WebP, Base64 image data, external stylesheet, or JavaScript is required. Keep the HTML file and the images folder together when importing.
14. Project resources
BSTVC project / R package:
https://github.com/bayesianstvc/BSTVC-R
Project website:
https://bayesianstvc.github.io/BSTVC-R/
Bayesian STVC research overview:
https://chaosong.blog/bayesian-stvc/
Original Chinese WeChat article:
https://mp.weixin.qq.com/s/mFV-_OFAjlATGyAVeuBQ6g
References
Exploring spatiotemporal nonstationary effects of climate factors on hand, foot, and mouth disease using a Bayesian Spatiotemporally Varying Coefficients (STVC) model in Sichuan, China. Science of the Total Environment, 648, 550–560. https://doi.org/10.1016/j.scitotenv.2018.08.114
Spatiotemporally Varying Coefficients (STVC) model: A Bayesian local regression to detect spatial and temporal nonstationarity in variable relationships. Annals of GIS, 26(3), 277–291. https://doi.org/10.1080/19475683.2020.1782469
Spatiotemporal disparities in regional public risk perception of COVID-19 using Bayesian Spatiotemporally Varying Coefficients (STVC) series models across Chinese cities. International Journal of Disaster Risk Reduction, 77, 103078. https://doi.org/10.1016/j.ijdrr.2022.103078
Spatiotemporal heterogeneity in associations of national population ageing with socioeconomic and environmental factors at the global scale. Journal of Cleaner Production, 373, 133781. https://doi.org/10.1016/j.jclepro.2022.133781
- Song, C., Shi, X., Bo, Y., Wang, J., Wang, Y., & Huang, D. (2019).
- Song, C., Shi, X., & Wang, J. (2020).
- Song, C., Yin, H., Shi, X., Xie, M., Yang, S., Zhou, J., Wang, X., Tang, Z., Yang, Y., & Pan, J. (2022).
- Wan, Q., Tang, Z., Pan, J., Xie, M., Wang, S., Yin, H., Li, J., Liu, X., Yang, Y., & Song, C. (2022).
Editorial note. This is a revised and expanded English blog edition based on the original Chinese WeChat article, the publicly available BSTVC project documentation, and the published methodological literature. The wording and structure have been reorganized for an international blog audience rather than translated sentence by sentence. The HTML uses only local standard image files (PNG) stored in the accompanying images/ folder. It contains no external CSS or JavaScript dependencies.
