TMB: Automatic Differentiation and Laplace Approximation
By Kasper Kristensen, Anders Nielsen, Casper W. Berg, Hans Julius Skaug, Bradley M. Bell. 2015
931 citations recorded by the source corpus.
TMB is an open source R package that enables quick implementation of complex nonlinear random effect (latent variable) models in a manner similar to the established AD Model Builder package (ADMB, admb-project.org). In addition, it offers easy access to parallel computations. The user defines the joint likelihood for the data and the random effects as a C++ template function, while all the other operations are done in R; e.g., reading in the data. The package evaluates and maximizes the Laplace approximation of the marginal likelihood where the random effects are automatically integrated out. This approximation, and its derivatives, are obtained using automatic differentiation (up to order three) of the joint likelihood. The computations are designed to be fast for problems with many random effects (~10^6) and parameters (~10^3). Computation times using ADMB and TMB are compared on a suite of examples ranging from simple models to large spatial models where the random effects are a Gaussian random field. Speedups ranging from 1.5 to about 100 are obtained with increasing gains for large problems. The package and examples are available at this http URL
Subfields: Economics and Econometrics, Environmental Engineering, Statistics and Probability
View Paper: https://www.semanticscholar.org/paper/fb355cfd007199d3594bc05dde7e7727fa2081be
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Economics and Econometrics
- Casper W. Berg
- Anders Nielsen
- Martin Mächler
- C. Costello
- Hans Julius Skaug
- Benjamin M. Bolker
- Mollie E. Brooks
- Koen J. van Benthem
In Environmental Engineering
- Casper W. Berg
- Anders Nielsen
- Christopher J. Paciorek
- Benjamin M. Bolker
- David I. Warton
- O. Jensen
- Francky Fouedjio
- Mikyoung Jun
In Statistics and Probability
- Casper W. Berg
- Anders Nielsen
- Benjamin M. Bolker
- Hans Julius Skaug
- Kasper Kristensen
- Mollie E. Brooks
- Koen J. van Benthem
- Arni Magnusson
Citations in the corpus
- Programming With Models: Writing Statistical Algorithms for General Model Structures With NIMBLE (2015, methodology): “Other tools with their own modeling language (or similar system) include AD Model Builder and its newer version, Template Model Builder (Fournier et al., 2012; Kristensen et al., 2015); Stan (2015); BayesX (Belitz et al., 2013); and PyMC (Patil et al., 2010).”
- Modeling zero-inflated count data with glmmTMB (2017, methodology): “To maximize flexibility and speed, glmmTMB’s estimation is done using the TMB package (Kristensen et al., 2016), but users need not be familiar with TMB.”
- glmmTMB Balances Speed and Flexibility Among Packages for Zero-inflated Generalized Linear Mixed Modeling (2017, methodology): “To maximize flexibility and speed, glmmTMB ’s estimation is done using the TMB package (Kristensen et al., 2016), but users need not be familiar with TMB .”
- Effective fisheries management instrumental in improving fish stock status (2020, methodology): “The state space model is estimated in TMB (1), which allows for flexibility in fitting, in 58 particular the sum-to-zero constraint on aj and the process equation on xt.”
- Accounting for correlated observations in an age-based state-space stock assessment model (2016, methodology): “In addition, introducing correlations across time will seriously affect the estimation speed, as this breaks the sparseness of the Hessian matrix, which is heavily exploited in TMB (Kristensen et al., 2016).”
- Parsimoniously Fitting Large Multivariate Random Effects in glmmTMB (2024, positive): “In glmmTMB we maximize a Laplace approximation of the marginal log-likelihood obtained from the package Template Model Builder ( TMB ) (Kristensen, Nielsen, Berg, Skaug, and Bell 2015) in R (or more precisely, minimize the negative log-likelihood).”