Skip to content

API reference

Latte fits latent Gaussian models (LGMs). The primary way to define one is the @latte macro: it reads your model body, classifies each ~ block, and returns a model object. That object is engine-agnostic — the same definition runs through inla, tmb, or hmc_laplace, and every engine returns results through one shared accessor API.

Latent Gaussian models

Every Latte engine targets the same model class:

p(θ,x,y)=p(θ)hyperpriorp(xθ)Gaussian latent field (GMRF)p(yx)cond.-independent observations

A Gaussian latent field x (a GMRF) governed by a few hyperparameters θ, with observations conditionally independent given the latent field. GLMMs, spatial (Besag, SPDE) and temporal (AR, random-walk) models, splines, and disease mapping all fit this template. You specify the three pieces — the hyperparameter priors, the latent GMRF, and the observation model — once, and any engine consumes it.

What's here

Component pages cover the individual pieces:

For worked, end-to-end models see the tutorials; for the inference methods themselves and how to tune each, see the engine pages.