Superseded as of 2026-04-24 by
plans/replan-2026-04.md. This document is retained for v0.0 historical context — the original phase numbering (Phase 0–6) is referenced by early ADRs and commit messages. Current-state work and phase gates (B–E) live in the replan. See ADR-014 for why.
Phased delivery. Each phase ends with runnable, tested output. Phase 0 can run concurrently with scaffolding in Phases 1 and 2, but substantive Phase 2 content (areal components) depends on Phase 1 M1–M3 (graph + concrete GMRFs
- sampling). Phase 4 (SPDE end-to-end) depends on Phase 3 (INLA algorithm). Phase 3 is the critical path.
Before Phase 3 starts, we should have:
AbstractGMRF+ sparse-graph + symmetric-Q implementation inGMRFs.jl.- Unconditional sampling from
N(0, Q⁻¹)with sum-to-zero constraints via LinearSolve.jl (CHOLMOD backend). BesagandIIDlatent components inLatentGaussianModels.jl.- A Gaussian-likelihood LGM closed-form solver (no Laplace yet) producing posterior mean and marginal variances of the latent field.
- End-to-end vignette: Scottish lip cancer Gaussian-approximated BYM fit vs R-INLA, agreement on posterior means within 1%.
If this works, the design is load-bearing. If it doesn't, the disagreement points to something structural (constraint correction, scaling, parameter conventions) that must be fixed before the rest of the stack is built.
- Package skeletons, CI (GitHub Actions: tests on Julia 1.10 LTS + current stable + nightly, on Linux/macOS/Windows).
- JuliaFormatter with SciML style, Aqua.jl, JET.jl in CI.
- Documenter.jl setup with a shared theme across the three packages.
- First ADRs written: package split, dependency policy, macro policy.
- R-INLA fixture generation harness:
scripts/generate-fixtures/with pinned R version, renv lockfile, script to emit JLD2 files.
Deliverables listed in packages/GMRFs.jl/plans/plan.md. Milestone:
qsample, qinv, log-determinant, constraint correction all matching
R-INLA to 1e-10 on IID, RW1, RW2, AR1, seasonal, generic0/1.
Besag, ICAR with sum-to-zero per connected component, BYM, BYM2, Leroux.
PC priors as first-class AbstractHyperPriors. Scaling of intrinsic GMRFs.
Milestone: Scotland lip cancer BYM2 posterior matches R-INLA.
Inner Newton for mode of x∣θ,y. Simplified and full Laplace
approximations. Hyperparameter mode, Hessian, CCD/grid integration over θ.
Gaussian, Poisson, Binomial, NegativeBinomial, Gamma likelihoods. Selected
inverse (Takahashi recursion) — explicit sub-milestone, see
plans/decisions.md. Milestone: Poisson spatial GLMM marginal posteriors
within 5% of R-INLA hyperparameters, 1% of latent-field means.
FEM assembly of C, G₁, G₂ on Meshes.jl triangulations (α ∈ {1, 2} first).
PC priors on range and σ (Fuglstad et al. 2019). Projector matrices as
SciMLOperators. Milestone: Meuse zinc SPDE fit end-to-end vs R-INLA.
Space-time separable via Kronecker components. Joint likelihoods. User- defined components (the rgeneric/cgeneric equivalent, already free from architecture). Model comparison: DIC, WAIC, CPO, PIT, log marginal likelihood.
Threaded CHOLMOD / Pardiso paths via LinearSolve. Lazy Kronecker operators. Fractional-α SPDE via rational approximations. GPU factorization via CUDSS.jl for very large meshes.
- MVP: 2–3 months full-time-equivalent work from a practitioner who knows the material.
- Competitive parity on small/medium problems (n ≲ 10⁴): 9–12 months FTE.
- Feature-sufficient for 80% of real spatial-epidemiology use cases: 18–24 months FTE.
- Feature parity with R-INLA's long tail: not a realistic goal.
- Byte-identical agreement with R-INLA. Different orderings and accumulation orders mean last-digit agreement isn't achievable.
- Covering every
inla.rgenericextension ever written. The rgeneric replacement is automatic from the architecture, but the long tail of existing esoteric R-INLA features is out of scope. - Supporting R's formula syntax verbatim. A macro sugar layer may parse a close-but-not-identical variant.