TMB: Automatic Differentiation and Laplace Approximation
arXiv:1509.00660 · doi:10.18637/jss.v070.i05
Abstract
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 http://tmb-project.org.
Cited by in corpus (44)
- Programming with models: writing statistical algorithms for general model structures with NIMBLE
- Uncovering ecological state dynamics with hidden Markov models
- Gaia Data Release 3: Catalogue Validation
- State-space models' dirty little secrets: even simple linear Gaussian models can have estimation problems
- A continuous-time state-space model for rapid quality-control of Argos locations from animal-borne tags
- Understanding the stochastic partial differential equation approach to smoothing
- Choosing the observational likelihood in state-space stock assessment models
- Temporal models for demographic and global health outcomes in multiple populations: Introducing a new framework to review and standardize documentation of model assumptions and facilitate model comparison
- Fast, Scalable Approximations to Posterior Distributions in Extended Latent Gaussian Models
- Longitudinal modeling of age-dependent latent traits with generalized additive latent and mixed models
- The conditionally autoregressive hidden Markov model (CarHMM): Inferring behavioural states from animal tracking data exhibiting conditional autocorrelation
- A guide to state-space modeling of ecological time series
- A Geometric Theory of Higher-Order Automatic Differentiation
- Detecting seasonal episodic-like spatiotemporal memory patterns using animal movement modelling
- Combining Hipparcos and Gaia data for the study of binaries: the BINARYS tool
- A gentle tutorial on accelerated parameter and confidence interval estimation for hidden Markov models using Template Model Builder
- Hamiltonian Monte Carlo using an adjoint-differentiated Laplace approximation: Bayesian inference for latent Gaussian models and beyond
- Binaries masses and luminosities with Gaia DR3
- disaggregation: An R Package for Bayesian Spatial Disaggregation Modelling
- Modelling ocean temperatures from bio-probes under preferential sampling
- A scalable and efficient covariate selection criterion for mixed effects regression models with unknown random effects structure
- A Statistical Introduction to Template Model Builder: A Flexible Tool for Spatial Modeling
- Sequential Monte Carlo Methods in the nimble R Package
- Adding smoothing splines to the SAM model improves stock assessment
- Joint spatio-temporal analysis of multiple response types using the hierarchical generalized transformation model with application to coronavirus disease 2019 and social distancing
- Stochastic Convergence Rates and Applications of Adaptive Quadrature in Bayesian Inference
- makemyprior: Intuitive Construction of Joint Priors for Variance Parameters in R
- Modelling corporate defaults: A Markov-switching Poisson log-linear autoregressive model
- Enhancing data-limited assessments with random effects: A case study on Korea chub mackerel (Scomber japonicus)
- Inferring HIV incidence trends and transmission dynamics with a spatio-temporal HIV epidemic model
- Heritability curves: a local measure of heritability
- A multi-level model for estimating region-age-time-type specific male circumcision coverage from household survey and health system data in South Africa
- Multivariate generalized linear mixed models for underdispersed count data
- Fast and Scalable Inference for Spatial Extreme Value Models
- The Multiplicative Mixed Model with the mumm R package as a General and Easy Random Interaction Model Tool
- Saddlepoint-adjusted inversion of characteristic functions
- Inverse sampling intensity weighting for preferential sampling adjustment
- Bayesian inference with tmbstan for a state-space model with VAR(1) state equation
- Robust Estimation for Discrete-Time State Space Models
- Fast, universal estimation of latent variable models using extended variational approximations
- MCEM and SAEM Algorithms for Geostatistical Models under Preferential Sampling
- spatialSim: multi-species spatiotemporal size-structured operating model for management strategy evaluation
- Species distribution modelling with spatio-temporal nearest neighbour Gaussian processes
- A Point Mass Proposal Method for Bayesian State-Space Model Fitting