adlaplace: Laplace Approximations Using Automatic Differentiation

Computes Laplace-approximate maximum likelihood for hierarchical and latent Gaussian models. A formula interface specifies observation densities (e.g. Gaussian, negative Binomial), fixed effects, and random terms (independent effects, smoothing terms). Customized response distributions and models for random effects can be specified through a low-level interface or by writing interoperable packages. Derivatives are computed using automatic differentiation with 'CppAD', and used in trust region optimization to find modes of random effects. Derivatives of the Laplace approximation of the log-likelihood are computed using third order contractions and is compatible with custom atomics. The approach follows Kristensen, Nielsen, Berg, Skaug, and Bell (2016) <doi:10.18637/jss.v070.i05>.

Version: 0.7.5
Depends: R (≥ 3.5.0)
Imports: Matrix (≥ 1.2.18), Rcpp (≥ 1.0.3), methods, stats, graphics, RCppAD (≥ 1.20260000.0-2)
LinkingTo: Rcpp, RcppEigen, trustOptim, Matrix, RCppAD (≥ 1.20260000.0-2)
Suggests: knitr, rmarkdown, trustOptim, testthat (≥ 3.0.0), data.table, mvQuad, mgcv, MASS, nlme, sn, terra, GET, WoodburyMatrix, extraDistr, RSpectra, aghq, numDeriv
Published: 2026-10-26
DOI: 10.32614/CRAN.package.adlaplace
Author: Patrick Brown [aut, cre, cph]
Maintainer: Patrick Brown <patrick.borgnine at gmail.com>
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: yes
SystemRequirements: OpenMP
Materials: README, NEWS
CRAN checks: adlaplace results

Documentation:

Reference manual: adlaplace.html , adlaplace.pdf
Vignettes: Laplace Approximations with adlaplace (source, R code)
Bayesian Bernoulli mixed model for the bacteria data (source, R code)
Case-crossover models with adlaplace (source, R code)
Approximate maximum influence perturbations (source, R code)
Equivalence to Conditional Gamma-Poisson Model (source, R code)
GAMM Examples (source, R code)
BYM disease mapping: Germany oral cavity cancer (source, R code)

Downloads:

Package source: adlaplace_0.7.5.tar.gz
Windows binaries: r-devel: adlaplace_0.7.4.zip, r-release: adlaplace_0.7.4.zip, r-oldrel: adlaplace_0.7.4.zip
macOS binaries: r-release (arm64): adlaplace_0.7.4.tgz, r-oldrel (arm64): not available, r-release (x86_64): adlaplace_0.7.5.tgz, r-oldrel (x86_64): adlaplace_0.7.5.tgz
Old sources: adlaplace archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=adlaplace to link to this page.