Programming with models: writing statistical algorithms for general model structures with NIMBLE
arXiv:1505.05093 · doi:10.1080/10618600.2016.1172487
Abstract
We describe NIMBLE, a system for programming statistical algorithms for general model structures within R. NIMBLE is designed to meet three challenges: flexible model specification, a language for programming algorithms that can use different models, and a balance between high-level programmability and execution efficiency. For model specification, NIMBLE extends the BUGS language and creates model objects, which can manipulate variables, calculate log probability values, generate simulations, and query the relationships among variables. For algorithm programming, NIMBLE provides functions that operate with model objects using two stages of evaluation. The first stage allows specialization of a function to a particular model and/or nodes, such as creating a Metropolis-Hastings sampler for a particular block of nodes. The second stage allows repeated execution of computations using the results of the first stage. To achieve efficient second-stage computation, NIMBLE compiles models and functions via C++, using the Eigen library for linear algebra, and provides the user with an interface to compiled objects. The NIMBLE language represents a compilable domain-specific language (DSL) embedded within R. This paper provides an overview of the design and rationale for NIMBLE along with illustrative examples including importance sampling, Markov chain Monte Carlo (MCMC) and Monte Carlo expectation maximization (MCEM).
20 pages, 2 figures
References in corpus (2)
Cited by in corpus (41)
- Rank-normalization, folding, and localization: An improved for assessing convergence of MCMC
- Modelling reporting delays for disease surveillance data
- A Hierarchical Framework for Correcting Under-Reporting in Count Data
- An Advanced Hidden Markov Model for Hourly Rainfall Time Series
- Multivariate Hierarchical Frameworks for Modelling Delayed Reporting in Count Data
- Evaluating recent methods to overcome spatial confounding
- On the normalized power prior
- spAbundance: An R package for single-species and multi-species spatially explicit abundance models
- Heterogeneous Regression Models for Clusters of Spatial Dependent Data
- Hierarchical Bayesian Thermonuclear Rate for the Be(n,p)Li Big Bang Nucleosynthesis Reaction
- A Bayesian marked spatial point processes model for basketball shot chart
- Global Household Energy Model: A Multivariate Hierarchical Approach to Estimating Trends in the Use of Polluting and Clean Fuels for Cooking
- Big problems in spatio-temporal disease mapping: methods and software
- A Bayesian spatio-temporal nowcasting model for public health decision-making and surveillance
- Estimating Seroprevalence of SARS-CoV-2 in Ohio: A Bayesian Multilevel Poststratification Approach with Multiple Diagnostic Tests
- Zero-state Coupled Markov Switching Count Models for Spatio-temporal Infectious Disease Spread
- A guide to state-space modeling of ecological time series
- Bayesian Non-Parametric Detection Heterogeneity in Ecological Models
- An integrated abundance model for estimating county-level prevalence of opioid misuse in Ohio
- Bayesian Modeling of Dynamic Behavioral Change During an Epidemic
- Modeling complex species-environment relationships through spatially-varying coefficient occupancy models
- bssm: Bayesian Inference of Non-linear and Non-Gaussian State Space Models in R
- Bayesian Variable Selection for Cox Regression Model with Spatially Varying Coefficients with Applications to Louisiana Respiratory Cancer Data
- A Bayesian Bootstrap for Mixture Models
- Spatio-Temporal Change of Support Modeling with R
- Independent finite approximations for Bayesian nonparametric inference
- Finite Population Survey Sampling: An Unapologetic Bayesian Perspective
- Combining chains of Bayesian models with Markov melding
- Bayesian high-dimensional covariate selection in non-linear mixed-effects models using the SAEM algorithm
- Incorporating Local Step-Size Adaptivity into the No-U-Turn Sampler using Gibbs Self Tuning
- On prior smoothing with discrete spatial data in the context of disease mapping
- A Two-Stage Cox Process Model with Spatial and Nonspatial Covariates
- Effect of the COVID-19 pandemic on bike-sharing demand and hire time: Evidence from Santander Cycles in London
- The 2025 Evaluation of Experimental Thermonuclear Reaction Rates (ETR25)
- A Comparison between Markov Switching Zero-inflated and Hurdle Models for Spatio-temporal Infectious Disease Counts
- Partial membership models for soft clustering of multivariate football player performance data
- Markov switching zero-inflated space-time multinomial models for comparing multiple infectious diseases
- Ballistic Convergence in Hit-and-Run Monte Carlo and a Coordinate-free Randomized Kaczmarz Algorithm
- CALF-SBM: A Covariate-Assisted Latent Factor Stochastic Block Model
- Modeling Globular Cluster Counts with Bayesian Latent Models
- Price Optimization Combining Conjoint Data and Purchase History: A Causal Modeling Approach