Skip to content

API Reference

Every exported type and function is documented here, grouped by what it is for. If you are after a worked example rather than a signature, the tutorials are the better place to start.

Most workflows only touch the first four groups. Solvers, preconditioners and linear maps matter when you are tuning performance or extending the package, and can be ignored until then.

Core types

  • GMRFs — the distribution types themselves, and the operations they support: means, marginal variances, sampling, conditioning.

  • Hard ConstraintsConstrainedGMRF, for models that must satisfy linear equality constraints exactly.

Building models

  • Latent Models — the LatentModel interface and the models that ship with the package: AR, RW, IID, Besag, BYM2, Matérn, and their combinations.

  • Autoregressive Models — autoregressive and conditional autoregressive constructors.

  • Formula Interface — composing models with StatsModels.jl formula syntax, which assembles the latent components and design matrix for you.

  • Spatial Utilities — building adjacency structures, such as contiguity matrices from polygons.

SPDE discretizations

  • SPDEs — the SPDE type and the equations that ship with the package.

  • Discretizations — turning an SPDE into a GMRF, in space and in space-time.

  • Meshes — helpers for constructing the finite element meshes those discretizations need.

Observations and inference

Computation and performance

  • Solvers — the sparse linear algebra backends that everything else is built on.

  • Preconditioners — preconditioning for iterative solvers.

  • Workspaces — reusing a symbolic factorization across many precision matrices with the same sparsity pattern.

  • Linear maps — the structured matrix types used to keep precision matrices cheap.

Further topics

  • KL Approximations — approximating a kernel-defined Gaussian process by a sparse GMRF, without going via an SPDE.

  • Graphical Lasso — estimating a sparse precision matrix from data when the structure is unknown.

  • Plotting — Makie recipes for spatial and spatiotemporal GMRFs.