IDEAS home Printed from https://ideas.repec.org/a/bla/istatr/v91y2023i2p318-342.html
   My bibliography  Save this article

A Statistical Review of Template Model Builder: A Flexible Tool for Spatial Modelling

Author

Listed:
  • Aaron Osgood‐Zimmerman
  • Jon Wakefield

Abstract

The integrated nested Laplace approximation (INLA) is a well‐known and popular technique for spatial modelling with a user‐friendly interface in the R‐INLA package. Unfortunately, only a certain class of latent Gaussian models are amenable to fitting with INLA. In this paper, we review template model builder (TMB), an existing technique and software package which is well‐suited to fitting complex spatio‐temporal models. TMB is relatively unknown to the spatial statistics community, but it is a flexible random effects modelling tool which allows users to define customizable and complex mixed effects models through C++ templates. After contrasting the methodology behind TMB with INLA, we provide a large‐scale simulation study assessing and comparing R‐INLA and TMB for continuous spatial models, fitted via the stochastic partial differential equations (SPDE) approximation. The results show that the predictive fields from both methods are comparable in most situations even though TMB estimates for fixed or random effects may have slightly larger bias than R‐INLA. We also present a smaller discrete spatial simulation study, in which both approaches perform well. We conclude with a joint analysis of breast cancer incidence and mortality data implemented in TMB which requires a model which cannot be fit with R‐INLA.

Suggested Citation

  • Aaron Osgood‐Zimmerman & Jon Wakefield, 2023. "A Statistical Review of Template Model Builder: A Flexible Tool for Spatial Modelling," International Statistical Review, International Statistical Institute, vol. 91(2), pages 318-342, August.
  • Handle: RePEc:bla:istatr:v:91:y:2023:i:2:p:318-342
    DOI: 10.1111/insr.12534
    as

    Download full text from publisher

    File URL: https://doi.org/10.1111/insr.12534
    Download Restriction: no

    File URL: https://libkey.io/10.1111/insr.12534?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Carpenter, Bob & Gelman, Andrew & Hoffman, Matthew D. & Lee, Daniel & Goodrich, Ben & Betancourt, Michael & Brubaker, Marcus & Guo, Jiqiang & Li, Peter & Riddell, Allen, 2017. "Stan: A Probabilistic Programming Language," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 76(i01).
    2. Cole C Monnahan & Kasper Kristensen, 2018. "No-U-turn sampling for fast Bayesian inference in ADMB and TMB: Introducing the adnuts and tmbstan R packages," PLOS ONE, Public Library of Science, vol. 13(5), pages 1-10, May.
    3. David L. Miller & Richard Glennie & Andrew E. Seaton, 2020. "Correction to: Understanding the Stochastic Partial Differential Equation Approach to Smoothing," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 25(2), pages 276-276, June.
    4. Lindgren, Finn & Rue, Håvard, 2015. "Bayesian Spatial Modelling with R-INLA," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 63(i19).
    5. Schlather, Martin & Malinowski, Alexander & Menck, Peter J. & Oesting, Marco & Strokorb, Kirstin, 2015. "Analysis, Simulation and Prediction of Multivariate Random Fields with Package RandomFields," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 63(i08).
    6. Ren, Qian & Banerjee, Sudipto & Finley, Andrew O. & Hodges, James S., 2011. "Variational Bayesian methods for spatial data analysis," Computational Statistics & Data Analysis, Elsevier, vol. 55(12), pages 3197-3217, December.
    7. Håvard Rue & Sara Martino & Nicolas Chopin, 2009. "Approximate Bayesian inference for latent Gaussian models by using integrated nested Laplace approximations," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 71(2), pages 319-392, April.
    8. David L. Miller & Richard Glennie & Andrew E. Seaton, 2020. "Understanding the Stochastic Partial Differential Equation Approach to Smoothing," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 25(1), pages 1-16, March.
    9. Martins, Thiago G. & Simpson, Daniel & Lindgren, Finn & Rue, Håvard, 2013. "Bayesian computing with INLA: New features," Computational Statistics & Data Analysis, Elsevier, vol. 67(C), pages 68-83.
    10. Jenni Niku & David I. Warton & Francis K. C. Hui & Sara Taskinen, 2017. "Generalized Linear Latent Variable Models for Multivariate Count and Biomass Data in Ecology," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 22(4), pages 498-522, December.
    11. Kristensen, Kasper & Nielsen, Anders & Berg, Casper W. & Skaug, Hans & Bell, Bradley M., 2016. "TMB: Automatic Differentiation and Laplace Approximation," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 70(i05).
    12. C Yu & P D Hoff, 2018. "Adaptive multigroup confidence intervals with constant coverage," Biometrika, Biometrika Trust, vol. 105(2), pages 319-335.
    13. Finn Lindgren & Håvard Rue & Johan Lindström, 2011. "An explicit link between Gaussian fields and Gaussian Markov random fields: the stochastic partial differential equation approach," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 73(4), pages 423-498, September.
    14. Jon Wakefield & Daniel Simpson & Jessica Godwin, 2016. "Comment: Getting into Space with a Weight Problem," Journal of the American Statistical Association, Taylor & Francis Journals, vol. 111(515), pages 1111-1118, July.
    15. Ana Julia Righetto & Christel Faes & Yannick Vandendijck & Paulo Justiniano Ribeiro, 2020. "On the choice of the mesh for the analysis of geostatistical data using R-INLA," Communications in Statistics - Theory and Methods, Taylor & Francis Journals, vol. 49(1), pages 203-220, January.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Sameh Abdulah & Yuxiao Li & Jian Cao & Hatem Ltaief & David E. Keyes & Marc G. Genton & Ying Sun, 2023. "Large‐scale environmental data science with ExaGeoStatR," Environmetrics, John Wiley & Sons, Ltd., vol. 34(1), February.
    2. John M. Humphreys & Robert B. Srygley & David H. Branson, 2022. "Geographic Variation in Migratory Grasshopper Recruitment under Projected Climate Change," Geographies, MDPI, vol. 2(1), pages 1-19, January.
    3. David L. Miller & Richard Glennie & Andrew E. Seaton, 2020. "Understanding the Stochastic Partial Differential Equation Approach to Smoothing," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 25(1), pages 1-16, March.
    4. Simon N. Wood, 2020. "Inference and computation with generalized additive models and their extensions," TEST: An Official Journal of the Spanish Society of Statistics and Operations Research, Springer;Sociedad de Estadística e Investigación Operativa, vol. 29(2), pages 307-339, June.
    5. Ingrid Sandvig Thorsen & Bård Støve & Hans J. Skaug, 2023. "A TMB Approach to Study Spatial Variation in Weather-Generated Claims in Insurance," SN Operations Research Forum, Springer, vol. 4(4), pages 1-27, December.
    6. Wang, Craig & Furrer, Reinhard, 2021. "Combining heterogeneous spatial datasets with process-based spatial fusion models: A unifying framework," Computational Statistics & Data Analysis, Elsevier, vol. 161(C).
    7. G. Mateo, Rubén & Aroca-Fernández, María José & Gastón, Aitor & Gómez-Rubio, Virgilio & Saura, Santiago & García-Viñas, Juan Ignacio, 2019. "Looking for an optimal hierarchical approach for ecologically meaningful niche modelling," Ecological Modelling, Elsevier, vol. 409(C), pages 1-1.
    8. Cho, Daegon & Hwang, Youngdeok & Park, Jongwon, 2018. "More buzz, more vibes: Impact of social media on concert distribution," Journal of Economic Behavior & Organization, Elsevier, vol. 156(C), pages 103-113.
    9. Yuan Yan & Eva Cantoni & Chris Field & Margaret Treble & Joanna Mills Flemming, 2023. "Spatiotemporal modeling of mature‐at‐length data using a sliding window approach," Environmetrics, John Wiley & Sons, Ltd., vol. 34(2), March.
    10. Bondo, Kristin J. & Rosenberry, Christopher S. & Stainbrook, David & Walter, W. David, 2024. "Comparing risk of chronic wasting disease occurrence using Bayesian hierarchical spatial models and different surveillance types," Ecological Modelling, Elsevier, vol. 493(C).
    11. Zhang, Shen & Liu, Xin & Tang, Jinjun & Cheng, Shaowu & Qi, Yong & Wang, Yinhai, 2018. "Spatio-temporal modeling of destination choice behavior through the Bayesian hierarchical approach," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 512(C), pages 537-551.
    12. C. Forlani & S. Bhatt & M. Cameletti & E. Krainski & M. Blangiardo, 2020. "A joint Bayesian space–time model to integrate spatially misaligned air pollution data in R‐INLA," Environmetrics, John Wiley & Sons, Ltd., vol. 31(8), December.
    13. André Victor Ribeiro Amaral & Elias Teixeira Krainski & Ruiman Zhong & Paula Moraga, 2024. "Model-Based Geostatistics Under Spatially Varying Preferential Sampling," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 29(4), pages 766-792, December.
    14. Dong Liang & Genevieve Nesslage & Michael Wilberg & Thomas Miller, 2017. "Bayesian Calibration of Blue Crab (Callinectes sapidus) Abundance Indices Based on Probability Surveys," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 22(4), pages 481-497, December.
    15. Silius M. Vandeskog & Sara Martino & Daniela Castro-Camilo & Håvard Rue, 2022. "Modelling Sub-daily Precipitation Extremes with the Blended Generalised Extreme Value Distribution," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 27(4), pages 598-621, December.
    16. Humphreys, John M. & Srygley, Robert B. & Lawton, Douglas & Hudson, Amy R. & Branson, David H., 2022. "Grasshoppers exhibit asynchrony and spatial non-stationarity in response to the El Niño/Southern and Pacific Decadal Oscillations," Ecological Modelling, Elsevier, vol. 471(C).
    17. Carlos Díaz-Avalos & Pablo Juan & Somnath Chaudhuri & Marc Sáez & Laura Serra, 2020. "Association between the New COVID-19 Cases and Air Pollution with Meteorological Elements in Nine Counties of New York State," IJERPH, MDPI, vol. 17(23), pages 1-18, December.
    18. Chiranjit Dutta & Nalini Ravishanker & Sumanta Basu, 2022. "Modeling Multivariate Positive-Valued Time Series Using R-INLA," Papers 2206.05374, arXiv.org, revised Jul 2022.
    19. Ropo E. Ogunsakin & Themba G. Ginindza, 2022. "Bayesian Spatial Modeling of Diabetes and Hypertension: Results from the South Africa General Household Survey," IJERPH, MDPI, vol. 19(15), pages 1-17, July.
    20. Chen, Yewen & Chang, Xiaohui & Luo, Fangzhi & Huang, Hui, 2023. "Additive dynamic models for correcting numerical model outputs," Computational Statistics & Data Analysis, Elsevier, vol. 187(C).

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:bla:istatr:v:91:y:2023:i:2:p:318-342. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Wiley Content Delivery (email available below). General contact details of provider: https://edirc.repec.org/data/isiiinl.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.