130 likes | 293 Views
BAD: Bayesian Analysis Diagnostics. Mark Thyer, Gulliaume Evin, Dmitri Kavetski, Benjamin Renard. Outline. What is BAD? BAD Capabilities How does BAD work How to use BAD Examples Future Research/Discussion. What is BAD?. Suite of R tools
E N D
BAD: Bayesian Analysis Diagnostics Mark Thyer, Gulliaume Evin, Dmitri Kavetski, Benjamin Renard
Outline • What is BAD? • BAD Capabilities • How does BAD work • How to use BAD • Examples • Future Research/Discussion
What is BAD? • Suite of R tools • Efficiently produce graphical diagnostics from a Bayesian analysis • e.g. output from a BATEA scenario • Simplifies the significant overhead in processing data associated with parameter and predictive uncertainty • Automatically produce pdfs with multiple diagnostics • mass production runs • Manually produce single diagnostic • suitable for presentation etc. • Single Scenarios • Compare Multiple Scenarios
BAD Capabilities: What diagnostics? • Evaluate model predictions • Time Series of Predictive Uncertainty • Predictive QQ plots
BAD Capabilities: What diagnostics? • Evaluate model assumptions • Residual Diagnostics • time series • Versus predicted • qq plots, • Acf/pacf
BAD Capabilities: What diagnostics? • Evaluate parameters: • Densities, Scatter plot matrix, MCMC convergence diagnostics • Easy to add more as required
BAD Capabilities: What diagnostics? • Evaluate parameters: • MCMC Convergence Diagnostics • Easy to add more as required
How does BAD work? Time Time Convert ASCII to BAD netcdf Produce Diagnostic Plots Initialise BAD Modeller Single plot/scenario Multi plots/scenario Controller scripts Code Conversion scripts (csv2nectcdf.bateau) Setup scripts (initialise_BAD) netcdf bad scripts (wrappers for plot scripts) plot scripts BATEA Output: ASCII bad.ncdf (ncdf) Files pdf/window (red arrows are control flow, blue arrows are data flow)
How to use BAD Setup/Installation (once per computer) • Download code: • Go to BAD website http://code.google.com/p/bad-/ and follow instructions • Follow instructions given in read.me to finish set-up: • Install and set-up Tinn-R, Run install_BAD.r to install packages dependencies Using BAD • Initialisation (once each time you use BAD) • Run initialise_BAD.r • Convert BATEA ASCII to BAD ncdf (once for each bateau run) • See example script: Ex.csv2netcdf.bateau.r • Produce diagnostics plots (as many different plots as you like)
Diagnostic Plot Examples Single Plot, Single Scenario • Probabilistic time series plots: • Script: Ex.plot.problim.bad.ncdf.r • Predictive QQ plots: • Script: Ex.plot.predictiveQQ.bad.ncdf.r • Residual plots: • Script: Ex.plot.residuals.multi.bad.ncdf.r • Parameter diagnostics: • Script: Ex.par.posterior.diagnostics.bad.ncdf.r
Diagnostic Plot Examples • Multi Plot, Single Scenario: • Script: Ex.bad.controller.auto.bateau.diagnostics.r • Single Plot, multi-scenario: • Script: Ex.multiscen.boxplot.multiparsamples.r • Multi-plot multi-scenario: • Script: Ex.multiscen.bad.controller.auto.bateau.diagnostics.r • These multi plot/scenario can be tailored to specific needs
Example using BAD diagnostics via BATEAU scripts Lacmalac_SLS_BAD_DIAG_skript.txt Need to add BAD_PATH to fpf files.
Future Work Turning BAD diagnostics into an R package (summer 2011/2012) Further refinements for interface with BATEAU Discussion/Questions?