Package: stLMM 0.0.4

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.4.tar.gz
stLMM_0.0.4.zip(r-4.7-x86_64)stLMM_0.0.4.zip(r-4.7-arm64)stLMM_0.0.4.zip(r-4.6-x86_64)stLMM_0.0.4.zip(r-4.6-arm64)stLMM_0.0.4.zip(r-4.5-x86_64)
stLMM_0.0.4.tgz(r-4.6-x86_64)stLMM_0.0.4.tgz(r-4.6-arm64)stLMM_0.0.4.tgz(r-4.5-x86_64)stLMM_0.0.4.tgz(r-4.5-arm64)
stLMM_0.0.4.tar.gz(r-4.7-arm64)stLMM_0.0.4.tar.gz(r-4.7-x86_64)stLMM_0.0.4.tar.gz(r-4.6-arm64)stLMM_0.0.4.tar.gz(r-4.6-x86_64)
stLMM_0.0.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
stLMM/json (API)

# Install 'stLMM' in R:
install.packages('stLMM', repos = c('https://finleya.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

6.36 score 7 stars 36 scripts 252 downloads 19 exports 4 dependencies

Last updated from:a60ef7e0fd. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK195
linux-devel-x86_64OK244
source / vignettesOK207
linux-release-arm64OK190
linux-release-x86_64OK234
macos-release-arm64OK265
macos-release-x86_64OK322
macos-oldrel-arm64OK286
macos-oldrel-x86_64OK340
windows-devel-arm64OK447
windows-devel-x86_64OK235
windows-release-arm64OK373
windows-release-x86_64OK276
windows-oldrel-x86_64OK272
wasm-releaseOK108

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-01
Started: 2026-06-16

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

Last update: 2026-07-01
Started: 2026-06-16

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