Bayesian Hierarchical Modeling of Arctic Sea Ice
Modeling 45 years of NSIDC satellite sea ice measurements across 14 Arctic subregions in Stan and brms to separate long-term decline from regional baselines and year-to-year persistence.
SE = 27.6 (> 2.65 SE), showing strong predictive improvement when modeling year-to-year residual autocorrelation.
95% credible interval [0.50, 0.66], confirming that sea ice anomalies persist strongly across consecutive years.
28 regional CSV files (1979–2023) merged in Python and modeled as annual log sea ice extent across the Arctic.
2 HMC chains × 4,000 iterations (ESS 900–2,200), validated across two prior sets with zero post-warmup divergences.
Why this mattered
Arctic sea ice extent is a core indicator of climate change, but collapsing satellite measurements into a single global trend masks stark regional differences. The Central Arctic stays heavily ice-covered while the Barents and Kara Seas are declining steeply, and ice extent in one year carries over into the next. Treating regions as independent or ignoring temporal autocorrelation produces overconfident intervals and weaker out-of-sample predictions.
What I built and owned
Completed as a two-person M.Sc. Data Science project (with Harsh Rana) in Prof. Paul Bürkner (creator of brms) and Prof. Katja Ickstadt's Applied Bayesian Data Analysis course at TU Dortmund. I built the Python/pandas ETL script merging all 28 raw NSIDC regional CSVs into a unified dataset, led the exploratory data analysis and ggplot2 diagnostics in R, implemented the brms/Stan No-AR vs. AR(1) and prior sensitivity scripts, and ran the PSIS-LOO model comparison and convergence checks.
Data Pipeline, Hierarchical Models & Validation
28 NSIDC CSVs to Log Annual Extent
Merged 28 NSIDC Sea Ice Index v3.0 files (14 regions, area and extent) in Python/pandas. Filtered to sea ice extent (>= 15% ice concentration), aggregated monthly records into annual regional means in R (data.table), and applied a natural log transform to handle strong right skew.
Baseline No-AR vs. AR(1) Residuals
Fit two Gaussian hierarchical models on log(Sea Ice Extent) with region-specific random intercepts (1 | Region) and a global time slope: an independent-residuals baseline (No-AR) and a lag-1 autoregressive model cor_ar(~ Year | Region, p = 1) capturing temporal persistence.
LOO-CV, PPC & Alternative Priors
Assigned explicit proper priors to every parameter and refit both models with narrower alternative priors to test sensitivity. Verified HMC mixing via R-hat, ESS, and trace plots, checked distributional fit with posterior predictive density overlays (bayesplot), and compared predictive accuracy via PSIS-LOO.
Posterior Estimates, Convergence & LOO-CV Comparison
Fit in brms/Stan using 2 HMC chains × 4,000 iterations (2,000 warmup, adapt_delta = 0.99, max_treedepth = 15).
| Model Specification | Time Slope β1 (95% CI) | AR(1) φ (95% CI) | Residual σ | R-hat / Min ESS | LOO ELPD Diff (SE) |
|---|---|---|---|---|---|
| Hierarchical AR(1) (Default Priors) | -0.05 [-0.07, -0.03] | 0.58 [0.50, 0.66] | 0.14 | 1.00 / 1,200 | 0.0 (Best) |
| Hierarchical No-AR (Default Priors) | -0.01 [-0.01, -0.01] | None (0) | 0.16 | 1.00 / 900 | -73.3 (SE 27.6) |
| Alternative Narrower Priors Check | Minimal shift | Minimal shift | Unchanged | 1.00 / Stable | Identical ranking |
Default priors: Intercept N(0, 5), Slope N(0, 2), sigma & sd Exponential(0.1), AR phi N(0, 0.5). Alternative priors: Intercept N(0, 3), Slope N(0, 1), sigma & sd Exponential(0.2), AR phi N(0, 0.3). Because Year entered uncentered, parameter scales differ between No-AR and AR(1), so model selection focused on out-of-sample LOO predictive density.
Exploratory Plots & Bayesian Diagnostics
Direct ggplot2 and bayesplot figures generated from the R/Stan repository scripts. Click any plot to inspect full resolution.
Key Takeaways
- Modeling temporal persistence made a decisive difference: adding an AR(1) residual structure (phi = 0.58, 95% CI [0.50, 0.66]) gained +73.3 ELPD units (SE = 27.6) over an independent-error hierarchical model.
- Inferences held steady under prior tightening: refitting both models with narrower normal and exponential priors barely shifted posterior means or credible intervals and preserved the exact LOO ranking.
- Two observations in the AR(1) model produced Pareto k > 0.7 (1.16 and 1.09) during LOO cross-validation. While unlikely to overturn a 2.65-SE margin, moment matching or partial reloo is the right way to refine influential points.
- Natural modeling extensions for follow-up work: centering Year around 2000 for interpretable intercepts, adding region-specific random slopes (1 + Year_c | Region) to estimate distinct regional decline rates, and modeling monthly seasonal curves with splines or Gaussian processes.