Learn PyINLA

Pick a topic to learn core concepts and how to use them in pyINLA.

Theory

How INLA Works

Understand the Integrated Nested Laplace Approximation and why it's fast for latent Gaussian models.

Understand the method
Families

Likelihoods

Choose a likelihood and link for your response (counts, proportions, survival...).

Explore likelihood families
Transforms

Link Functions

Identity, log, logit and more. How links connect linear predictors to responses.

Explore link functions
Latent terms

Fixed Effects

Add one or more fixed-effect covariates to your model.

Explore fixed effects
Latent terms

Random Effects

Add iid, group-specific, temporal and spatial components via model['random'].

Explore random effects
Latent terms

The Latent Field

How fixed and random effects combine in the latent field to form the linear predictor.

Explore the latent field
Bayesian setup

Priors

Choose priors for fixed effects, hyperparameters and more; configure defaults or overrides.

Configure priors
Results

Marginal Posteriors

Understand marginal distributions and use utility functions to evaluate, transform, sample, and summarize them.

Open marginal posteriors
Advanced

Posterior Sampling

Draw samples from the joint posterior for derived quantities, predictions, and Monte Carlo integration.

Open posterior sampling
Advanced

Multiple Likelihoods

Fit one model where different observations follow different likelihoods, sharing covariates and random effects across families.

Open multiple likelihoods
Results

Predictions & NAs

Generate predictions, handle missing values, and understand how pyINLA treats NAs.

Open predictions & NAs
Model checks

Diagnostics

DIC, WAIC, log marginal likelihood and CPO/PIT for comparing and assessing fitted models.

Open diagnostics
Spatial

Creating Meshes & fmesher

Build spatial domains, boundaries and meshes for SPDE models using Python's fmesher wrapper.

Explore mesh building
Spatial

Maps

Download administrative boundaries, build adjacency graphs, and plot posterior values on choropleth maps for Besag/BYM2 models.

Open maps
Reference

Defaults

What pyINLA chooses for you, and how to override it.

Open defaults
Performance

Runtime & Threads

Tune parallelism, temporary files, and verbosity. Infrastructure knobs that change speed without affecting the fit.

Explore runtime knobs