Introduction to Bayesian Statistical Software: WinBUGS 1.4.3 Beth Devine, PharmD, MBA, PhD Rafael Alfonso, MD, PhC Evidence Synthesis 9/22/2011 2:30 pm.

Slides:



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

MCMC estimation in MlwiN
Previous Lecture: Distributions. Introduction to Biostatistics and Bioinformatics Estimation I This Lecture By Judy Zhong Assistant Professor Division.
The Incorporation of Meta-Analysis Results into Evidence-Based Decision Modelling Nicola Cooper, Alex Sutton, Keith Abrams, Paul Lambert, David Jones Department.
Bayesian Estimation in MARK
Estimation of Sample Size
What role should probabilistic sensitivity analysis play in SMC decision making? Andrew Briggs, DPhil University of Oxford.
Bayesian statistics – MCMC techniques
EVAL 6970: Meta-Analysis Fixed-Effect and Random- Effects Models Dr. Chris L. S. Coryn Spring 2011.
MARE 250 Dr. Jason Turner Hypothesis Testing II. To ASSUME is to make an… Four assumptions for t-test hypothesis testing:
Using ranking and DCE data to value health states on the QALY scale using conventional and Bayesian methods Theresa Cain.
Heterogeneity in Hedges. Fixed Effects Borenstein et al., 2009, pp
Department of Geography, Florida State University
DISCUSSION Alex Sutton Centre for Biostatistics & Genetic Epidemiology, University of Leicester.
1 D r a f t Life Cycle Assessment A product-oriented method for sustainability analysis UNEP LCA Training Kit Module k – Uncertainty in LCA.
INFERENTIAL STATISTICS – Samples are only estimates of the population – Sample statistics will be slightly off from the true values of its population’s.
Chapter 24: Comparing Means.
Overview of Meta-Analytic Data Analysis
8: Fixed & Random Summaries with Preferred Binary Input Fixed and random-effects overall or summary effects for odds and risk Meta-analysis in R with Metafor.
Statistics for clinical research An introductory course.
Introduction to WinBUGS Olivier Gimenez. A brief history  1989: project began with a Unix version called BUGS  1998: first Windows version, WinBUGS.
Confidence Intervals Nancy D. Barker, M.S.. Statistical Inference.
Sampling and Confidence Interval
Introduction to MCMC and BUGS. Computational problems More parameters -> even more parameter combinations Exact computation and grid approximation become.
Chapter 8: Confidence Intervals
Hypothesis Testing Quantitative Methods in HPELS 440:210.
Chapter 10 Comparing Two Means Target Goal: I can use two-sample t procedures to compare two means. 10.2a h.w: pg. 626: 29 – 32, pg. 652: 35, 37, 57.
A Beginner’s Guide to Bayesian Modelling Peter England, PhD EMB GIRO 2002.
The AIE Monte Carlo Tool The AIE Monte Carlo tool is an Excel spreadsheet and a set of supporting macros. It is the main tool used in AIE analysis of a.
The AIE Monte Carlo Tool The AIE Monte Carlo tool is an Excel spreadsheet and a set of supporting macros. It is the main tool used in AIE analysis of a.
PARAMETRIC STATISTICAL INFERENCE
Using SPSS for Windows Part II Jie Chen Ph.D. Phone: /6/20151.
WinBUGS Demo Saghir A. Bashir Amgen Ltd, Cambridge, U.K. 4 th January 2001.
1 SMU EMIS 7364 NTU TO-570-N Inferences About Process Quality Updated: 2/3/04 Statistical Quality Control Dr. Jerrell T. Stracener, SAE Fellow.
Sampling and Confidence Interval Kenneth Kwan Ho Chui, PhD, MPH Department of Public Health and Community Medicine
The Campbell Collaborationwww.campbellcollaboration.org C2 Training: May 9 – 10, 2011 Introduction to meta-analysis.
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
ANOVA: Analysis of Variance.
September 18-19, 2006 – Denver, Colorado Sponsored by the U.S. Department of Housing and Urban Development Conducting and interpreting multivariate analyses.
Analysis Overheads1 Analyzing Heterogeneous Distributions: Multiple Regression Analysis Analog to the ANOVA is restricted to a single categorical between.
Sampling distributions rule of thumb…. Some important points about sample distributions… If we obtain a sample that meets the rules of thumb, then…
Basics of Biostatistics for Health Research Session 1 – February 7 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.
Ch15: Decision Theory & Bayesian Inference 15.1: INTRO: We are back to some theoretical statistics: 1.Decision Theory –Make decisions in the presence of.
CHAPTER 27: One-Way Analysis of Variance: Comparing Several Means
1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Example: In a recent poll, 70% of 1501 randomly selected adults said they believed.
Bayes Theorem. Prior Probabilities On way to party, you ask “Has Karl already had too many beers?” Your prior probabilities are 20% yes, 80% no.
One Sample Mean Inference (Chapter 5)
Course: Research in Biomedicine and Health III Seminar 5: Critical assessment of evidence.
Younghun Han Department of Epidemiology UT MD Anderson Cancer Center
1 Getting started with WinBUGS Mei LU Graduate Research Assistant Dept. of Epidemiology, MD Anderson Cancer Center Some material was taken from James and.
Chapter 6: Descriptive Statistics. Learning Objectives Describe statistical measures used in descriptive statistics Compute measures of central tendency.
Outline Historical note about Bayes’ rule Bayesian updating for probability density functions –Salary offer estimate Coin trials example Reading material:
1 Life Cycle Assessment A product-oriented method for sustainability analysis UNEP LCA Training Kit Module k – Uncertainty in LCA.
Canadian Bioinformatics Workshops
Date of download: 7/10/2016 Copyright © The American College of Cardiology. All rights reserved. From: Trials and Tribulations of Non-Inferiority: The.
1 One goal in most meta-analyses is to examine overall, or typical effects We might wish to estimate and test the value of an overall (general) parameter.
Chapter 13 Simple Linear Regression
More on Inference.
MCMC Stopping and Variance Estimation: Idea here is to first use multiple Chains from different initial conditions to determine a burn-in period so the.
Two-Sample Hypothesis Testing
The binomial applied: absolute and relative risks, chi-square
Chapter 2 Simple Comparative Experiments
Chapter 8: Inference for Proportions
Inference Concerning a Proportion
Chapter 23 Comparing Means.
Lesson Comparing Two Means.
Gerald Dyer, Jr., MPH October 20, 2016
Chapter 24 Comparing Means Copyright © 2009 Pearson Education, Inc.
Multiple Regression – Split Sample Validation
Inference on the Mean of a Population -Variance Known
Presentation transcript:

Introduction to Bayesian Statistical Software: WinBUGS Beth Devine, PharmD, MBA, PhD Rafael Alfonso, MD, PhC Evidence Synthesis 9/22/2011 2:30 pm Supported by the Institute of Translational Health Sciences, Grant NIH 3 UL1 RR S2 and the UW CHASE Alliance

Comparative Effectiveness of Biologic Therapies in Rheumatoid Arthritis (RA): An Indirect Treatment Comparisons Approach Beth Devine, PharmD, MBA, PhD Rafael Alfonso-Cristancho, MD, MS Sean Sullivan, BSPharm, PhD Pharmaceutical Outcomes Research & Policy Program University of Washington Pharmacotherapy 2011;31:39–51

WinBUGS – Model Syntax

WinBUGS – Load Data

WinBUGS – Model Compiled

WinBUGS – Model Initialized

WinBUGS – Update (Burn-in)

WinBUGS – Check Convergence

WinBUGS – Obtaining Posterior Inference

WinBUGS – Viewing Summary Statistics

WinBUGS – Interpreting Summary Statistics Check start and sample columns – 10,000 to 30,000 Rename your parameters Assess accuracy of posterior estimates by calculating Monte Carlo error for each parameter: Rule of thumb: MC error should be < 5% of sample standard deviation Exponentiate median log odds to odds ratios

Now Introducing our Practice Dataset

Advantage of Bayesian analysis in ITC/ MTC is that it allows calculation of the probability of which treatment is best or Lunn, Thomas, Best, Speigelhalter. Stat Comput 2000;10:325-37

Outcome Measures How is your outcome of interest measured? –Binary (e.g. dead or alive) –Continuous (e.g blood pressure) –Categorical/ordinal (e.g. severity scale) Binary outcomes most common –We will consider here Continuous –Similar approach to binary Ordinal –More complex and more rare

Binary Outcome Measures Binary outcome data from a comparative study can be expressed in a 2 x 2 table Three common outcome measures: –Odds ratios, risk ratios, risk differences Failure/DeadSuccess/Alive New TreatmentAB ControlCD RCT

Fixed Effects Model Statistical homogeneity Formally assume: Y i = Normal(d,V i ) We estimate the common true effect, d True effect=d Point estimate= Y i Random error=V i

Generic Fixed Effect Y i ~ Normal(d,V i ) where i= 1…….N studies Y i is the observed effect in study i with Variance V i All studies assumed to be measuring the same underlying effect size, d For a Bayesian analysis, a prior distribution must be specified for d

Choice of Prior for d Often, amount of information in studies is large enough to render any prior of little importance – therefore choice not critical Often specified as “vague” or “flat” E.g. If meta-analysis is on ln(OR) scale, could specify d~Normal (0, 10 5 ) This states a priori we would be 95% certain that true value of d is between [0±1.96(  10 5 )]

Fixed Effect with Prior Y i ~ Normal(d,V i )where i= 1…….N studies d ~ Normal(0, 10 5 ) Models are specified in WinBUGS using formulas similar to this algebra Note: Normal distributions are specified by mean and ‘precision’ –where precision = 1/variance Estimate model parameter using MCMC, rather than inverse weighting of variance

Example: Meta-analysis, RCTs of effect of aspirin preventing death after acute MIs StudyAspirin GroupPlacebo Group DeathsTotalDeathsTotal MRC CDP MRC GASP PARIS AMIS ISIS Fleiss. Statistical Methods in Medical Research 1993

Example: Calculation: Log(OR) & Variance For MCR-1 OR=(566*67)/ (557*49) = Log(ln)OR = Variance lnOR = 1/ /49 + 1/ /67 = Note- this is OR for Survival If 2x2 table contains any zeros, common to add 0.5 to those cells before calculations SurviveDie Aspirin56649 Placebo55767

Example: Aspirin Data to be Combined StudyORLnOR (Y i )Var(lnOR) (V i )Weight (1/V i ) MRC CDP MRC GASP PARIS AMIS ISIS Note: ISIS-2 with small variance and large weight (1/0.002)

Now It’s Your Turn: Practice using WinBUGS!

Launch WinBUGS Click on WinBUGS14.exe Click File-Open Load aspirin FE.odc

Components of WinBUGS.odc file Model { } #Data #Starting Values

Steps for Running a Model in WinBUGS 1.Make model active. Doodles: If in own window, click title bar. If in compound document, double-click the doodle (should have “hairy” border). Text: Simply highlight the word “model” at the beginning of your model. 2.Bring up Model Specification Tool (menu: Model -> Specification) 3.Click “check model” Should see “model is syntactically correct” in lower left corner of window. 4.Highlight first row of data containing variable labels (if in rectangular format) 5.Click “load data” Should see “data is loaded” in lower left corner of window. 6.If using multiple chains, enter number in “num of chains” box. Otherwise, proceed. 7.Click “compile” Should see “model is compiled” in lower left corner of window. 8.Highlight line containing initial values: list(…) 9.Click “load inits” If using multiple chains, you will need to repeat steps 8-9 for each chain. Should see “model is initialized.” 10.Bring up Sample Monitor Tool (menu: Inference -> Samples) Enter name of each node you wish to monitor and click “set” 11.Bring up Update Tool (menu: Model -> Update) 12.Enter a number of samples to take and click “update.” Should see “model is updating.”

Load and Check Model

Load and Check Data

Compile Model

Load Initials

Pooled OR: median 1.12 (1.05 to 1.19)

Random Effects Model Model –Within studies Y i ~Normal(  i,Vi) –Across studies  I ~Normal(d,  2 ) d=solid line  =dotted lines  2 = variability between studies (heterogeneity) True Mean Effect=d solid line Trial-specific effects=dotted lines Y5Y5 55 Vi

Generic Random Effect Y i ~ Normal( ,V i )where i= 1…….N studies  i ~ Normal(d,  2 ) As for fixed effect, Y i is observed effect in study i with variance V i Now study specific effects,  I are allowed to be different from each other and are assumed to be sampled from a Normal distribution with mean d and variance  2 For a Bayesian analysis, a prior distribution is required for  2 as well as for d

Choice of Prior for  2 This is a little trickier than for d Variances cannot be negative so Normal distribution is not a good choice Examples in WinBUGS Manual use Uniform distribution. E.g.  ~ Uniform (0,10)  of 10 is massive, because we are working with ORs; even  of 1 or 2 is large Specification of vague priors on variance components is complex and is an active area of research

Generic Random Effects Model Load aspirin RE.odc

Results of Aspirin RE model Pooled OR: median ( ) –OR now contains 1 Bayesian CrI wider than classical CI –  2 is random variable and uncertainty is included in pooled result

Compare our Two Odds Ratios and CrIs Fixed effects Normal Distribution –OR=1.12 (95% CrI: 1.05, 1.19) Random Effects Normal Distribution –OR=1.15 (95% CrI: 0.97, 1.44)

MCMC Basics Now that we’ve run a few models consider sensitivity analyses Sensitivity to prior distributions –esp. important for distributions of variance/precision parameters Sensitivity to initial values –Multiple chains using very different starting values & comparing using Brooks Gelman-Rubin Statistics Length of “burn in”: examine history/trace plots

Interpreting Random Effects A single parameter cannot adequately summarize heterogeneous effects Therefore estimation and reporting of  2 is important This tells us how much variability there is between estimates from the population of studies In some instances studies contain both beneficial and harmful effects, so important!

Looking to the Future (The Future is Here!) Data Sources RCT1RCT2Obs 1 Routine Care Meta- Analysis General Synthesis Bayes Theorem Combination Evidence Synthesis Clinical Effects Adverse Effects UtilityCosts Model Inputs (w/ uncertainty) Decision Model Utility Cost Tx A Fib Warfarin NoWarfarin No Strk Stroke No Strk Bleed NoBld Bleed NoBld Bleed Utility Cost

Questions? Attribution for Fleiss example to Keith Abrams, University of Leicester, UK