R2WinBUGS: Using R for Bayesian Analysis Matthew Russell Rongxia Li 2 November 2010 2010 Northeastern Mensurationists Meeting.

Slides:



Advertisements
Similar presentations
Introduction to Monte Carlo Markov chain (MCMC) methods
Advertisements

Other MCMC features in MLwiN and the MLwiN->WinBUGS interface
NCeSS e-Stat quantitative node Prof. William Browne & Prof. Jon Rasbash University of Bristol.
Lecture #4: Bayesian analysis of mapped data Spatial statistics in practice Center for Tropical Ecology and Biodiversity, Tunghai University & Fushan Botanical.
Probabilistic models Jouni Tuomisto THL. Outline Deterministic models with probabilistic parameters Hierarchical Bayesian models Bayesian belief nets.
INTRODUCTION TO MACHINE LEARNING Bayesian Estimation.
1 Bayesian methods for parameter estimation and data assimilation with crop models David Makowski and Daniel Wallach INRA, France September 2006.
Welcome to Amsterdam!. Bayesian Modeling for Cognitive Science: A WinBUGS Workshop.
Bayesian Estimation in MARK
Gibbs Sampling Qianji Zheng Oct. 5th, 2010.
Markov-Chain Monte Carlo
Bayesian statistics – MCMC techniques
Gaussian Processes to Speed up Hamiltonian Monte Carlo Matthieu Lê Journal Club 11/04/141 Neal, Radford M (2011). " MCMC Using Hamiltonian Dynamics. "
Industrial Engineering College of Engineering Bayesian Kernel Methods for Binary Classification and Online Learning Problems Theodore Trafalis Workshop.
Introduction  Bayesian methods are becoming very important in the cognitive sciences  Bayesian statistics is a framework for doing inference, in a principled.
. PGM: Tirgul 8 Markov Chains. Stochastic Sampling  In previous class, we examined methods that use independent samples to estimate P(X = x |e ) Problem:
A Bayesian view of language evolution by iterated learning Tom Griffiths Brown University Mike Kalish University of Louisiana.
Exploring subjective probability distributions using Bayesian statistics Tom Griffiths Department of Psychology Cognitive Science Program University of.
CENTER FOR BIOLOGICAL SEQUENCE ANALYSIS Bayesian Inference Anders Gorm Pedersen Molecular Evolution Group Center for Biological Sequence Analysis Technical.
Using ranking and DCE data to value health states on the QALY scale using conventional and Bayesian methods Theresa Cain.
Bayesian Analysis for Extreme Events Pao-Shin Chu and Xin Zhao Department of Meteorology School of Ocean & Earth Science & Technology University of Hawaii-
Everything you ever wanted to know about BUGS, R2winBUGS, and Adaptive Rejection Sampling A Presentation by Keith Betts.
A Practical Course in Graphical Bayesian Modeling; Class 1 Eric-Jan Wagenmakers.
Image Analysis and Markov Random Fields (MRFs) Quanren Xiong.
Bayesian Inference Using JASP
University of Minnesota Medical Technology Evaluation and Market Research Course: MILI/PUBH 6589 Spring Semester, 2012 Stephen T. Parente, Ph.D. Carlson.
WSEAS AIKED, Cambridge, Feature Importance in Bayesian Assessment of Newborn Brain Maturity from EEG Livia Jakaite, Vitaly Schetinin and Carsten.
Mean Field Inference in Dependency Networks: An Empirical Study Daniel Lowd and Arash Shamaei University of Oregon.
Introduction to WinBUGS Olivier Gimenez. A brief history  1989: project began with a Unix version called BUGS  1998: first Windows version, WinBUGS.
Bayesian parameter estimation in cosmology with Population Monte Carlo By Darell Moodley (UKZN) Supervisor: Prof. K Moodley (UKZN) SKA Postgraduate conference,
Introduction to MCMC and BUGS. Computational problems More parameters -> even more parameter combinations Exact computation and grid approximation become.
A Beginner’s Guide to Bayesian Modelling Peter England, PhD EMB GIRO 2002.
1 Develop a Tool for Therapeutic Drug Monitoring in R Using OpenBUGS Speaker: Miao-ting Chen 1, M.S. Mentor: Yung-jin Lee 2 1 Department of Hospital Pharmacy,
1 Gil McVean Tuesday 24 th February 2009 Markov Chain Monte Carlo.
1 Peter Fox GIS for Science ERTH 4750 (98271) Week 8, Tuesday, March 20, 2012 Analysis and propagation of errors.
Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Fault Prediction with Particle Filters by David Hatfield mentors: Dr.
Probabilistic Models for Discovering E-Communities Ding Zhou, Eren Manavoglu, Jia Li, C. Lee Giles, Hongyuan Zha The Pennsylvania State University WWW.
Tracking Multiple Cells By Correspondence Resolution In A Sequential Bayesian Framework Nilanjan Ray Gang Dong Scott T. Acton C.L. Brown Department of.
Latent Class Regression Model Graphical Diagnostics Using an MCMC Estimation Procedure Elizabeth S. Garrett Scott L. Zeger Johns Hopkins University
MCMC in practice Start collecting samples after the Markov chain has “mixed”. How do you know if a chain has mixed or not? In general, you can never “proof”
Bayesian Prior and Posterior Study Guide for ES205 Yu-Chi Ho Jonathan T. Lee Nov. 24, 2000.
The generalization of Bayes for continuous densities is that we have some density f(y|  ) where y and  are vectors of data and parameters with  being.
1 Francisco José Vázquez Polo [ Miguel Ángel Negrín Hernández [ {fjvpolo or
Probabilistic models Jouni Tuomisto THL. Outline Deterministic models with probabilistic parameters Hierarchical Bayesian models Bayesian belief nets.
Markov Chain Monte Carlo for LDA C. Andrieu, N. D. Freitas, and A. Doucet, An Introduction to MCMC for Machine Learning, R. M. Neal, Probabilistic.
A shared random effects transition model for longitudinal count data with informative missingness Jinhui Li Joint work with Yingnian Wu, Xiaowei Yang.
Item Parameter Estimation: Does WinBUGS Do Better Than BILOG-MG?
Bayesian Statistics, Modeling & Reasoning What is this course about? P548: Intro Bayesian Stats with Psych Applications Instructor: John Miyamoto 01/04/2016:
1 Chapter 8: Model Inference and Averaging Presented by Hui Fang.
04/21/2005 CS673 1 Being Bayesian About Network Structure A Bayesian Approach to Structure Discovery in Bayesian Networks Nir Friedman and Daphne Koller.
Bayesian Modelling Harry R. Erwin, PhD School of Computing and Technology University of Sunderland.
Bayesian statistics named after the Reverend Mr Bayes based on the concept that you can estimate the statistical properties of a system after measuting.
Statistical Methods. 2 Concepts and Notations Sample unit – the basic landscape unit at which we wish to establish the presence/absence of the species.
1 Getting started with WinBUGS Mei LU Graduate Research Assistant Dept. of Epidemiology, MD Anderson Cancer Center Some material was taken from James and.
Density Estimation in R Ha Le and Nikolaos Sarafianos COSC 7362 – Advanced Machine Learning Professor: Dr. Christoph F. Eick 1.
JAGS. Learning Objectives Be able to represent ecological systems as a network of known and unknowns linked by deterministic and stochastic relationships.
Outline Historical note about Bayes’ rule Bayesian updating for probability density functions –Salary offer estimate Coin trials example Reading material:
Computing with R & Bayesian Statistical Inference P548: Intro Bayesian Stats with Psych Applications Instructor: John Miyamoto 01/11/2016: Lecture 02-1.
Hierarchical Models. Conceptual: What are we talking about? – What makes a statistical model hierarchical? – How does that fit into population analysis?
Markov Chain Monte Carlo in R
MCMC Output & Metropolis-Hastings Algorithm Part I
Bayesian data analysis
Bayesian Methods Allow updating an existing probability when additional information is made available Allows flexibility when integrating different types.
Multidimensional Integration Part I
the goal of Bayesian divergence time estimation
First, a question Can we find the perfect value for a parameter?
CS639: Data Management for Data Science
Wellington Cabrera Advisor: Carlos Ordonez
Bayesian Networks in Educational Assessment
Infusing Bayesian strategies for Pharmaceutical Manufacturing and Development JSM 2019 Bill Pikounis, Dwaine Banton, John Oleynick, and Jyh-Ming Shoung.
Presentation transcript:

R2WinBUGS: Using R for Bayesian Analysis Matthew Russell Rongxia Li 2 November Northeastern Mensurationists Meeting

Bayesian ideologies 8 (aka what UMaine students needed to learn to pass Bill Halteman’s MAT500 course) P(H|Y), not P(Y|H) Probability is the likelihood of an event occurring Prior knowledge can be incorporated Model parameters are random variables

Benefits Posterior distributions generated for model parameters Statistics can be computed (e.g. mean, median, mode) A formal distribution does not need to be assumed Uncertainty of model parameters can be directly assessed Models easily updated with new data Consider old model as a prior

bayes* AND [forestry OR silvic*] Web of Science results:

WinBUGS Software for Bayesian analysis using Markov chain Monte Carlo methods Standard GUI OpenBUGS – Open source version of BUGS – Future development will be with OpenBUGS –

R packages R2WinBUGS – Writes data and scripts in R and calls WinBUGS Useful for: – running multiple datasets – changing model specifications – Results can be provided in R BRugs – Collection of functions that allow graphical analysis

Example: Penobscot Experimental Forest snag data n=1,009

Snag survival Probability of snag survival a function of time since tree death (Garber et al. 2005) Seven species examined – BF, RS, EH, WS, WC, PB, RM

.bug file model{ for(i in 1:3) {b[i]~dnorm(0,1.0E-6)} prec~dgamma(0.001,0.001) for(i in 1:numTrees) { preds[i]<-1/(b[1]+b[2]*pow((t[i]),b[3])) Psurv[i]~dnorm(preds[i],prec) } } Specify priors Loop through trees

samplesHistory (‘*’)

samplesDensity(‘*’)

samplesStats (‘*’)

Assessing results from BUGS (from McCarthy 2007) samplesHistory – If it is not white noise, it might be autocorrelation Are samplesDensity truncated? – Priors might be inadequate Bumpy samplesDensity? – Consider more samples Specify different initial values… do you get the same results? – Consider Gelman-Rubin statistic Measures the influence of specifying initial values

Other OS and other programs WinBUGS can be run on Linux/Unix/Mac through Wine – But JAGS (Just Another Gibbs Sampler) might work better for Linux users Macros available for SAS/Excel Matlab-WinBUGS GUI available

Sources WinBUGS R2WinBUGS OpenBUGS BRugs JAGS McCarthy, M.A Bayesian methods for ecology. Cambridge Univ. Press. 296 pp. Gelman et al Bayesian data analysis. Chapman Hall/CRC. 696 pp. Albert, J Bayesian computation with R. Springer. 300 pp.

Summary Plenty of tools available for Bayesian analysis with R – All are open source Coding is not terribly complex Lots of measures for assessing results – Graphical – Empirical R2WinBUGS as a learning tool for Bayesian methods