Examples
Every example is a runnable script under
examples/, each with a
README stating what it shows and its expected output. Run any of them from the
repo root:
PYTHONPATH=src python examples/<name>/run.py
Most are covered by the CI suite, so the numbers in their READMEs are checked
rather than remembered.
Reproducing published results
| Example |
Shows |
columbus_spatial_econometrics |
Anselin (1988), Table 12.1 — OLS reproduces the published values exactly; SAR lands next to the published ML spatial-error estimates, halving the apparent income effect. Walkthrough: case study |
state_income_dynamic_network |
A network that changes every year — real US state income and contiguity, recovering knocked-out panel cells ~5× better than the baselines. Walkthrough: case study |
Start here
Spatial and network structure
Effect modifiers (weights, copy, replicate, group)
| Example |
Shows |
grouped_panel |
Grouped vs Replicated — a spatial field whose yearly copies are tied by an AR1, cutting latent error ~25% against independent copies by borrowing strength across years |
Time, frequency and forecasting
| Example |
Shows |
midas_nowcast |
MIDAS smooth-lag regression of a low-frequency target on high-frequency lags |
hybrid_nowcast |
MIDAS + BYM2 + AR1 composed into one latent field that fits and predicts |
synthetic_panel |
A panel with both unit and time structure |
nic_backtest |
A rolling-origin backtest configuration with covariate-availability rules |
Counts, durations and model choice
Hyperparameters and posterior integration
| Example |
Shows |
empirical_bayes |
Type-II ML estimation of a precision, prior-free |
map_ii |
The same fit penalised by a PC prior (MAP-II) |
inla |
Grid integration over hyperparameters instead of a point estimate |
inla_sla |
Simplified-Laplace latent marginals, with skewness |
inla_full_laplace |
Full-Laplace latent marginals and their quantiles |
inla_criteria |
DIC / WAIC / CPO / PIT model assessment |