Package: stLMM 0.0.3

Andrew O. Finley

stLMM: Bayesian Spatial and Space-Time Linear Mixed Models

Fits Bayesian linear mixed models for spatial and space-time data with fixed effects, independent and identically distributed (iid) grouped random effects, and structured latent processes. The formula interface supports first-order autoregressive (AR(1)) effects, dense Gaussian processes, nearest-neighbor Gaussian processes, proper and Leroux conditional autoregressive (CAR) effects, ordered directed acyclic graph autoregressive (DAGAR) effects, separable CAR-time and DAGAR-time effects, and spatially varying coefficients. The sampler uses sparse precision matrix calculations when available and includes post-fitting tools for latent process recovery, fitted values, prediction, pointwise log likelihoods, and posterior sample extraction. Method details include Datta et al. (2016) <doi:10.1080/01621459.2015.1044091>, Finley et al. (2019) <doi:10.1080/10618600.2018.1537924>, Datta et al. (2019) <doi:10.1214/19-BA1177>, and May and Finley (2025) <doi:10.1016/j.spasta.2025.100917>.

Authors:Andrew O. Finley [aut, cre], Sudipto Banerjee [ctb], Abhirup Datta [ctb], Paul B. May [ctb]

stLMM_0.0.3.tar.gz
stLMM_0.0.3.zip(r-4.7-x86_64)stLMM_0.0.3.zip(r-4.7-arm64)stLMM_0.0.3.zip(r-4.6-x86_64)stLMM_0.0.3.zip(r-4.6-arm64)
stLMM_0.0.3.tar.gz(r-4.7-arm64)stLMM_0.0.3.tar.gz(r-4.7-x86_64)stLMM_0.0.3.tar.gz(r-4.6-arm64)stLMM_0.0.3.tar.gz(r-4.6-x86_64)
stLMM_0.0.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
stLMM/json (API)

# Install 'stLMM' in R:
install.packages('stLMM', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/finleya/stlmm/issues

Pkgdown/docs site:https://finleya.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • stunitco - FIA state, unit, and county polygons

On CRAN:

Conda:

quartoopenblascppopenmp

3.56 score 36 scripts 191 downloads 19 exports 4 dependencies

Last updated from:a1c8b8d39f. Checks:10 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK183
linux-devel-x86_64OK241
source / vignettesOK210
linux-release-arm64OK213
linux-release-x86_64OK227
windows-devel-arm64OK393
windows-devel-x86_64OK332
windows-release-arm64OK373
windows-release-x86_64OK284
wasm-releaseOK121

Exports:as_mcmcas_samplesbeta_distcar_graphfixedflatgamma_distget_cor_modelshalf_normalhalf_tiglog_liklog_normalnormalrecoverresidstLMMuniformwaic

Dependencies:BayesLogitcodalatticeMatrix

Getting started with stLMM
Overview | Fixed-effect model | Grouped random effects | Classical SAE model connection | Structured process terms

Last update: 2026-07-28
Started: 2026-07-28

Spatial NNGP models with stLMM
Overview | Model | Data | Fit | Recover | Predict | What this example illustrates | Full GP comparison

Last update: 2026-07-28
Started: 2026-07-28

Readme and manuals

Help Manual

Help pageTopics
Convert stLMM samples to coda objectsas_mcmc as_mcmc.stLMM as_mcmc.stLMM_chains as_mcmc.stLMM_recovery as_mcmc.stLMM_recovery_chains
Collect stLMM posterior samples in a data frameas_samples
Build a CAR adjacency graphcar_graph plot.stLMM_car_graph plot.stLMM_graph
Posterior fitted values for an stLMM fitfitted.stLMM
List supported covariance modelsget_cor_models
Pointwise log likelihood and WAIClog_lik log_lik.stLMM log_lik.stLMM_chains log_lik.stLMM_recovery log_lik.stLMM_recovery_chains waic waic.default waic.stLMM waic.stLMM_chains waic.stLMM_recovery waic.stLMM_recovery_chains
Posterior prediction from recovered stLMM fitspredict.stLMM predict.stLMM_chains predict.stLMM_recovery predict.stLMM_recovery_chains
Recover latent process drawsrecover recover.stLMM recover.stLMM_chains
Residual variance formula termresid
Fit a Bayesian mixed model with structured latent processesstLMM
Print, summarize, and plot stLMM objectsplot.stLMM plot.stLMM_chains plot.stLMM_prediction plot.stLMM_prediction_chains plot.stLMM_recovery plot.stLMM_recovery_chains print.stLMM print.stLMM_chains print.stLMM_prediction print.stLMM_recovery summary.stLMM summary.stLMM_chains summary.stLMM_prediction summary.stLMM_recovery summary.stLMM_recovery_chains
Prior constructors for stLMMbeta_dist fixed flat gamma_dist half_normal half_t ig log_normal normal stLMM-priors stLMM_priors uniform
stLMM formula termsar1 car car_time dagar dagar_time gp iid nngp stLMM-terms stLMM_terms
FIA state, unit, and county polygonsstunitco