Holds analysis associated with a paper attempting to put bounds on how much malaria molecular surveillance is needed in Africa
# DR Hotspot Analysis
Spatiotemporal Bayesian analysis of K13 antimalarial-resistance markers in aast Africa, by exact Gaussian-process MCMC.
## Overview
Three K13 mutations associated with artemisinin partial resistance are modelled
**jointly** across space and time:
| Marker | Region | Bounding box (lon / lat) |
|--------|--------|--------------------------|
| **622I** | Ethiopia / Horn of Africa | 30–45 / 4–18 |
| **675V** | DRC / Uganda | 28–38 / −1–6 |
| **561H** | Tanzania / DRC border | 27–33 / −5–1 |
Site-level prevalence data come from the STAVE
dataset (pinned to commit `2d85d02`), filtered to 2010 onward; one row is one
prevalence estimate per site-visit.
The analysis fits a family of separable space-time Gaussian-process (GP) models to
binomial prevalence under a logit link, using **exact full-N MCMC** (Stan / NUTS) —
no INLA/SPDE or other approximation. All three markers are fit in a **single joint
model** that shares the spatial length scale across markers through a hierarchical
(random-effect) prior, while keeping every other parameter marker-specific. Model
comparison (WAIC + posterior-predictive RMSE) selects the best covariance
structure, which is then used to produce posterior maps of mean prevalence and
uncertainty on a dense spatiotemporal prediction grid.
**Selected model: `const_AR1_exp_nug`** — an exponential spatial kernel with a
separable continuous-time AR1 temporal term, an observation nugget, and an
intercept-only mean. It wins outright on joint WAIC (top-4 are all AR1·exp,
ΔWAIC ≤ 6.6, then a ~15-point gap to the next cluster).
## The joint model
A single Stan fit (`R/stan_models/gp.stan`) stacks all three markers.
Because the markers occupy disjoint regions, the joint covariance is
**block-diagonal**, so the per-gradient cost is Σ O(N_m³), not O((ΣN)³). Sharing is
at the hyperparameter level only:
- `log l_space[m] ~ Normal(mu_ls, tau_ls)` — hierarchical spatial length scale
(non-centred), pooled across markers;
- everything …