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. 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).
    5. C Yu & P D Hoff, 2018. "Adaptive multigroup confidence intervals with constant coverage," Biometrika, Biometrika Trust, vol. 105(2), pages 319-335.
    6. Lindgren, Finn & Rue, Håvard, 2015. "Bayesian Spatial Modelling with R-INLA," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 63(i19).
    7. 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).
    8. 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.
    9. 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.
    10. 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.
    11. 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.
    12. 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.
    13. 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.
    14. 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.
    15. 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.
    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. Andre Python & Andreas Bender & Marta Blangiardo & Janine B. Illian & Ying Lin & Baoli Liu & Tim C.D. Lucas & Siwei Tan & Yingying Wen & Davit Svanidze & Jianwei Yin, 2022. "A downscaling approach to compare COVID‐19 count data from databases aggregated at different spatial scales," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 185(1), pages 202-218, January.
    10. 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.
    11. Jacqueline D. Seufert & Andre Python & Christoph Weisser & Elías Cisneros & Krisztina Kis‐Katos & Thomas Kneib, 2022. "Mapping ex ante risks of COVID‐19 in Indonesia using a Bayesian geostatistical model on airport network data," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 185(4), pages 2121-2155, October.
    12. 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.
    13. Paige, John & Fuglstad, Geir-Arne & Riebler, Andrea & Wakefield, Jon, 2022. "Bayesian multiresolution modeling of georeferenced data: An extension of ‘LatticeKrig’," Computational Statistics & Data Analysis, Elsevier, vol. 173(C).
    14. 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.
    15. John M. Humphreys, 2022. "Amplification in Time and Dilution in Space: Partitioning Spatiotemporal Processes to Assess the Role of Avian-Host Phylodiversity in Shaping Eastern Equine Encephalitis Virus Distribution," Geographies, MDPI, vol. 2(3), pages 1-16, July.
    16. 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.
    17. 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.
    18. 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).
    19. 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.
    20. Yuheng Ling, 2020. "Time, space and hedonic prediction accuracy: evidence from Corsican apartment markets," The Annals of Regional Science, Springer;Western Regional Science Association, vol. 64(2), pages 367-388, April.

    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.