IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v071i09.html
   My bibliography  Save this article

runjags: An R Package Providing Interface Utilities, Model Templates, Parallel Computing Methods and Additional Distributions for MCMC Models in JAGS

Author

Listed:
  • Denwood, Matthew J.

Abstract

The runjags package provides a set of interface functions to facilitate running Markov chain Monte Carlo models in JAGS from within R. Automated calculation of appropriate convergence and sample length diagnostics, user-friendly access to commonly used graphical outputs and summary statistics, and parallelized methods of running JAGS are provided. Template model specifications can be generated using a standard lme4-style formula interface to assist users less familiar with the BUGS syntax. Automated simulation study functions are implemented to facilitate model performance assessment, as well as drop-k type cross-validation studies, using high performance computing clusters such as those provided by parallel. A module extension for JAGS is also included within runjags, providing the Pareto family of distributions and a series of minimally-informative priors including the DuMouchel and half-Cauchy priors. This paper outlines the primary functions of this package, and gives an illustration of a simulation study to assess the sensitivity of two equivalent model formulations to different prior distributions.

Suggested Citation

  • Denwood, Matthew J., 2016. "runjags: An R Package Providing Interface Utilities, Model Templates, Parallel Computing Methods and Additional Distributions for MCMC Models in JAGS," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 71(i09).
  • Handle: RePEc:jss:jstsof:v:071:i09
    DOI: http://hdl.handle.net/10.18637/jss.v071.i09
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v071i09/v71i09.pdf
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v071i09/runjags_2.0.4-2.tar.gz
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v071i09/v71i09.R
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v071.i09?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. Bates, Douglas & Mächler, Martin & Bolker, Ben & Walker, Steve, 2015. "Fitting Linear Mixed-Effects Models Using lme4," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 67(i01).
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Steele, Fiona & Grundy, Emily, 2021. "Random effects dynamic panel models for unequally-spaced multivariate categorical repeated measures: an application to child-parent exchanges of support," LSE Research Online Documents on Economics 106255, London School of Economics and Political Science, LSE Library.
    2. Mehmet Kutluay & Roy Brouwer & Richard S. J. Tol, 2017. "Preference updating in public health risk valuation," Working Paper Series 1517, Department of Economics, University of Sussex Business School.
    3. Fangpo Wang & Anirban Bhattacharya & Alan E. Gelfand, 2018. "Process modeling for slope and aspect with application to elevation data maps," TEST: An Official Journal of the Spanish Society of Statistics and Operations Research, Springer;Sociedad de Estadística e Investigación Operativa, vol. 27(4), pages 749-772, December.
    4. Aghabazaz, Zeynab & Kazemi, Iraj, 2023. "Under-reported time-varying MINAR(1) process for modeling multivariate count series," Computational Statistics & Data Analysis, Elsevier, vol. 188(C).
    5. Abdisalam Hassan Muse & Samuel Mwalili & Oscar Ngesa & Christophe Chesneau & Afrah Al-Bossly & Mahmoud El-Morshedy, 2022. "Bayesian and Frequentist Approaches for a Tractable Parametric General Class of Hazard-Based Regression Models: An Application to Oncology Data," Mathematics, MDPI, vol. 10(20), pages 1-41, October.
    6. Guangbao Guo & Guoqi Qian & Lu Lin & Wei Shao, 2021. "Parallel inference for big data with the group Bayesian method," Metrika: International Journal for Theoretical and Applied Statistics, Springer, vol. 84(2), pages 225-243, February.
    7. Gaudeul, Alexia & Crosetto, Paolo, 2019. "Fast then slow: A choice process explanation for the attraction effect," University of Göttingen Working Papers in Economics 386, University of Goettingen, Department of Economics.
    8. Merkle, Edgar C. & Steyvers, Mark & Mellers, Barbara & Tetlock, Philip E., 2017. "A neglected dimension of good forecasting judgment: The questions we choose also matter," International Journal of Forecasting, Elsevier, vol. 33(4), pages 817-832.
    9. Jabed H. Tomal & Hafizur Rahman, 2021. "A Bayesian piecewise linear model for the detection of breakpoints in housing prices," METRON, Springer;Sapienza Università di Roma, vol. 79(3), pages 361-381, December.
    10. Sarah Depaoli & James P. Clifton & Patrice R. Cobb, 2016. "Just Another Gibbs Sampler (JAGS)," Journal of Educational and Behavioral Statistics, , vol. 41(6), pages 628-649, December.
    11. Mahdiyeh, Zahra & Kazemi, Iraj, 2019. "An innovative strategy on the construction of multivariate multimodal linear mixed-effects models," Journal of Multivariate Analysis, Elsevier, vol. 174(C).
    12. Gianluca Boo & Edith Darin & Douglas R. Leasure & Claire A. Dooley & Heather R. Chamberlain & Attila N. Lázár & Kevin Tschirhart & Cyrus Sinai & Nicole A. Hoff & Trevon Fuller & Kamy Musene & Arly Bat, 2022. "High-resolution population estimation using household survey data and building footprints," Nature Communications, Nature, vol. 13(1), pages 1-10, December.
    13. Hippel, Svenja & Hoeppner, Sven, 2021. "Contracts as reference points: A replication," International Review of Law and Economics, Elsevier, vol. 65(C).
    14. Hayashi, Kohta & Iijima, Hayato, 2022. "Density estimation of non-independent unmarked animals from camera traps," Ecological Modelling, Elsevier, vol. 472(C).
    15. Johnson, Fred A. & Zimmerman, Guthrie S. & Jensen, Gitte H. & Clausen, Kevin K. & Frederiksen, Morten & Madsen, Jesper, 2020. "Using integrated population models for insights into monitoring programs: An application using pink-footed geese," Ecological Modelling, Elsevier, vol. 415(C).
    16. Cao, Wen-Rui & Huang, Qiu-Ru & Zhang, Nan & Liang, Hui-Juan & Xian, Ben-Song & Gan, Xiao-Fang & Xu, Dong Roman & Lai, Ying-Si, 2022. "Mapping the travel modes and acceptable travel time to primary healthcare institutions: A case study in Inner Mongolia Autonomous Region, China," Journal of Transport Geography, Elsevier, vol. 102(C).
    17. Alexina J. Mason & Manuel Gomes & James Carpenter & Richard Grieve, 2021. "Flexible Bayesian longitudinal models for cost‐effectiveness analyses with informative missing data," Health Economics, John Wiley & Sons, Ltd., vol. 30(12), pages 3138-3158, December.
    18. Edgar C. Merkle & Daniel Furr & Sophia Rabe-Hesketh, 2019. "Bayesian Comparison of Latent Variable Models: Conditional Versus Marginal Likelihoods," Psychometrika, Springer;The Psychometric Society, vol. 84(3), pages 802-829, September.
    19. Dexen DZ. Xi & C.B. Dean & Stephen W. Taylor, 2020. "Modeling the duration and size of extended attack wildfires as dependent outcomes," Environmetrics, John Wiley & Sons, Ltd., vol. 31(5), August.
    20. Jabed Tomal & Saeed Rahmati & Shirin Boroushaki & Lingling Jin & Ehsan Ahmed, 2021. "The Impact of COVID-19 on Students’ Marks: A Bayesian Hierarchical Modeling Approach," METRON, Springer;Sapienza Università di Roma, vol. 79(1), pages 57-91, April.
    21. Markus Glatt & Roy Brouwer & Ivana Logar, 2019. "Combining Risk Attitudes in a Lottery Game and Flood Risk Protection Decisions in a Discrete Choice Experiment," Environmental & Resource Economics, Springer;European Association of Environmental and Resource Economists, vol. 74(4), pages 1533-1562, December.
    22. Ng'ombe, John, 2019. "Economics of the Greenseeder Hand Planter, Discrete Choice Modeling, and On-Farm Field Experimentation," Thesis Commons jckt7, Center for Open Science.
    23. Larissa S. Melo & Veber A. F. Costa & Wilson S. Fernandes, 2023. "Assessing the Anthropogenic and Climatic Components in Runoff Changes of the São Francisco River Catchment," Water Resources Management: An International Journal, Published for the European Water Resources Association (EWRA), Springer;European Water Resources Association (EWRA), vol. 37(9), pages 3615-3629, July.
    24. Fiona Steele & Emily Grundy, 2021. "Random effects dynamic panel models for unequally spaced multivariate categorical repeated measures: an application to child–parent exchanges of support," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 70(1), pages 3-23, January.
    25. Kellie J. Archer & Anna Eames Seffernick & Shuai Sun & Yiran Zhang, 2022. "ordinalbayes: Fitting Ordinal Bayesian Regression Models to High-Dimensional Data Using R," Stats, MDPI, vol. 5(2), pages 1-14, April.

    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. JANSSENS, Jochen & DE CORTE, Annelies & SÖRENSEN, Kenneth, 2016. "Water distribution network design optimisation with respect to reliability," Working Papers 2016007, University of Antwerp, Faculty of Business and Economics.
    2. Raymond Hernandez & Elizabeth A. Pyatak & Cheryl L. P. Vigen & Haomiao Jin & Stefan Schneider & Donna Spruijt-Metz & Shawn C. Roll, 2021. "Understanding Worker Well-Being Relative to High-Workload and Recovery Activities across a Whole Day: Pilot Testing an Ecological Momentary Assessment Technique," IJERPH, MDPI, vol. 18(19), pages 1-17, October.
    3. Jie Zhao & Ji Chen & Damien Beillouin & Hans Lambers & Yadong Yang & Pete Smith & Zhaohai Zeng & Jørgen E. Olesen & Huadong Zang, 2022. "Global systematic review with meta-analysis reveals yield advantage of legume-based rotations and its drivers," Nature Communications, Nature, vol. 13(1), pages 1-9, December.
    4. F J Heather & D Z Childs & A M Darnaude & J L Blanchard, 2018. "Using an integral projection model to assess the effect of temperature on the growth of gilthead seabream Sparus aurata," PLOS ONE, Public Library of Science, vol. 13(5), pages 1-19, May.
    5. Valentina Krenz & Arjen Alink & Tobias Sommer & Benno Roozendaal & Lars Schwabe, 2023. "Time-dependent memory transformation in hippocampus and neocortex is semantic in nature," Nature Communications, Nature, vol. 14(1), pages 1-17, December.
    6. Morán-Ordóñez, Alejandra & Ameztegui, Aitor & De Cáceres, Miquel & de-Miguel, Sergio & Lefèvre, François & Brotons, Lluís & Coll, Lluís, 2020. "Future trade-offs and synergies among ecosystem services in Mediterranean forests under global change scenarios," Ecosystem Services, Elsevier, vol. 45(C).
    7. Jack McDonnell & Thomas McKenna & Kathryn A. Yurkonis & Deirdre Hennessy & Rafael Andrade Moral & Caroline Brophy, 2023. "A Mixed Model for Assessing the Effect of Numerous Plant Species Interactions on Grassland Biodiversity and Ecosystem Function Relationships," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 28(1), pages 1-19, March.
    8. Ana Pinto & Tong Yin & Marion Reichenbach & Raghavendra Bhatta & Pradeep Kumar Malik & Eva Schlecht & Sven König, 2020. "Enteric Methane Emissions of Dairy Cattle Considering Breed Composition, Pasture Management, Housing Conditions and Feeding Characteristics along a Rural-Urban Gradient in a Rising Megacity," Agriculture, MDPI, vol. 10(12), pages 1-18, December.
    9. Damian M. Herz & Manuel Bange & Gabriel Gonzalez-Escamilla & Miriam Auer & Keyoumars Ashkan & Petra Fischer & Huiling Tan & Rafal Bogacz & Muthuraman Muthuraman & Sergiu Groppa & Peter Brown, 2022. "Dynamic control of decision and movement speed in the human basal ganglia," Nature Communications, Nature, vol. 13(1), pages 1-15, December.
    10. Kathrin Stenchly & Marc Victor Hansen & Katharina Stein & Andreas Buerkert & Wilhelm Loewenstein, 2018. "Income Vulnerability of West African Farming Households to Losses in Pollination Services: A Case Study from Ouagadougou, Burkina Faso," Sustainability, MDPI, vol. 10(11), pages 1-12, November.
    11. Dongyan Liu & Chongran Zhou & John K. Keesing & Oscar Serrano & Axel Werner & Yin Fang & Yingjun Chen & Pere Masque & Janine Kinloch & Aleksey Sadekov & Yan Du, 2022. "Wildfires enhance phytoplankton production in tropical oceans," Nature Communications, Nature, vol. 13(1), pages 1-9, December.
    12. Zhaogeng Yang & Yanhui Li & Peijin Hu & Jun Ma & Yi Song, 2020. "Prevalence of Anemia and its Associated Factors among Chinese 9-, 12-, and 14-Year-Old Children: Results from 2014 Chinese National Survey on Students Constitution and Health," IJERPH, MDPI, vol. 17(5), pages 1-10, February.
    13. Marco Lopez-Cruz & Fernando M. Aguate & Jacob D. Washburn & Natalia Leon & Shawn M. Kaeppler & Dayane Cristina Lima & Ruijuan Tan & Addie Thompson & Laurence Willard Bretonne & Gustavo los Campos, 2023. "Leveraging data from the Genomes-to-Fields Initiative to investigate genotype-by-environment interactions in maize in North America," Nature Communications, Nature, vol. 14(1), pages 1-14, December.
    14. Baumann, Elias & Kern, Jana & Lessmann, Stefan, 2019. "Usage Continuance in Software-as-a-Service," IRTG 1792 Discussion Papers 2019-005, Humboldt University of Berlin, International Research Training Group 1792 "High Dimensional Nonstationary Time Series".
    15. Alexandra M. Cheney & Stephanann M. Costello & Nicholas V. Pinkham & Annie Waldum & Susan C. Broadaway & Maria Cotrina-Vidal & Marc Mergy & Brian Tripet & Douglas J. Kominsky & Heather M. Grifka-Walk , 2023. "Gut microbiome dysbiosis drives metabolic dysfunction in Familial dysautonomia," Nature Communications, Nature, vol. 14(1), pages 1-12, December.
    16. repec:cup:judgdm:v:16:y:2021:i:1:p:201-237 is not listed on IDEAS
    17. C. Gabriel Hidalgo Pizango & Eurídice N. Honorio Coronado & Jhon del Águila-Pasquel & Gerardo Flores Llampazo & Johan de Jong & César J. Córdova Oroche & José M. Reyna Huaymacari & Steve J. Carver & D, 2022. "Sustainable palm fruit harvesting as a pathway to conserve Amazon peatland forests," Nature Sustainability, Nature, vol. 5(6), pages 479-487, June.
    18. Myrto Pantazi & Olivier Klein & Mikhail Kissine, 2020. "Is justice blind or myopic? An examination of the effects of meta-cognitive myopia and truth bias on mock jurors and judges," Judgment and Decision Making, Society for Judgment and Decision Making, vol. 15(2), pages 214-229, March.
    19. Loreto A Correa & Cecilia León & Juan Ramírez-Estrada & Álvaro Ly-Prieto & Sebastián Abades & Loren D Hayes & Mauricio Soto-Gamboa & Luis A Ebensperger, 2021. "One for all and all for one: phenotype assortment and reproductive success in masculinized females," Behavioral Ecology, International Society for Behavioral Ecology, vol. 32(6), pages 1266-1275.
    20. Caroline North & C. Nathan Marti & Alexandra Loukas, 2021. "Longitudinal Impact of Depressive Symptoms and Peer Tobacco Use on the Number of Tobacco Products Used by Young Adults," IJERPH, MDPI, vol. 18(21), pages 1-11, October.
    21. Heather Williams & Andrew Scharf & Anna R. Ryba & D. Ryan Norris & Daniel J. Mennill & Amy E. M. Newman & Stéphanie M. Doucet & Julie C. Blackwood, 2022. "Cumulative cultural evolution and mechanisms for cultural selection in wild bird songs," Nature Communications, Nature, vol. 13(1), pages 1-11, December.

    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:jss:jstsof:v:071:i09. 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: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    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.