Performing Bayesian analysis in Stata using WinBUGS Tom Palmer, John - - PowerPoint PPT Presentation

performing bayesian analysis in stata using winbugs
SMART_READER_LITE
LIVE PREVIEW

Performing Bayesian analysis in Stata using WinBUGS Tom Palmer, John - - PowerPoint PPT Presentation

Performing Bayesian analysis in Stata using WinBUGS Tom Palmer, John Thompson & Santiago Moreno Department of Health Sciences, University of Leicester, UK 13 th UK Stata Users Group Meeting, 10 September 2007 Tom Palmer (Leicester) Running


slide-1
SLIDE 1

Performing Bayesian analysis in Stata using WinBUGS

Tom Palmer, John Thompson & Santiago Moreno

Department of Health Sciences, University of Leicester, UK

13th UK Stata Users Group Meeting, 10 September 2007

Tom Palmer (Leicester) Running WinBUGS from Stata 1 / 24

slide-2
SLIDE 2

Outline

1

The Bayesian approach & WinBUGS

2

The winbugsfromstata package

3

How to run an analysis

4

Summary & developments

Tom Palmer (Leicester) Running WinBUGS from Stata 2 / 24

slide-3
SLIDE 3

The Bayesian approach

Bayes Theorem

Posterior ∝ Likelihood × prior

Tom Palmer (Leicester) Running WinBUGS from Stata 3 / 24

slide-4
SLIDE 4

The Bayesian approach

Bayes Theorem

Posterior ∝ Likelihood × prior Direct probability statements - not frequentist - subjective

Tom Palmer (Leicester) Running WinBUGS from Stata 3 / 24

slide-5
SLIDE 5

The Bayesian approach

Bayes Theorem

Posterior ∝ Likelihood × prior Direct probability statements - not frequentist - subjective Complex posterior marginal distributions - estimation via simulation

Tom Palmer (Leicester) Running WinBUGS from Stata 3 / 24

slide-6
SLIDE 6

The Bayesian approach

Bayes Theorem

Posterior ∝ Likelihood × prior Direct probability statements - not frequentist - subjective Complex posterior marginal distributions - estimation via simulation Markov chain Monte Carlo (MCMC) methods

Tom Palmer (Leicester) Running WinBUGS from Stata 3 / 24

slide-7
SLIDE 7

WinBUGS

Bayesian statistics using Gibbs sampling

Tom Palmer (Leicester) Running WinBUGS from Stata 4 / 24

slide-8
SLIDE 8

WinBUGS

Bayesian statistics using Gibbs sampling MRC Biostatistics unit

http://www.mrc-bsu.cam.ac.uk/bugs

Tom Palmer (Leicester) Running WinBUGS from Stata 4 / 24

slide-9
SLIDE 9

WinBUGS

Bayesian statistics using Gibbs sampling MRC Biostatistics unit

http://www.mrc-bsu.cam.ac.uk/bugs

Health Economics, Medical Statistics

Tom Palmer (Leicester) Running WinBUGS from Stata 4 / 24

slide-10
SLIDE 10

WinBUGS

Bayesian statistics using Gibbs sampling MRC Biostatistics unit

http://www.mrc-bsu.cam.ac.uk/bugs

Health Economics, Medical Statistics Disadvantages: data management, post-processing of results, graphics

Tom Palmer (Leicester) Running WinBUGS from Stata 4 / 24

slide-11
SLIDE 11

The winbugsfromstata package

Stata interface to WinBUGS [Thompson et al., 2006]

http://www2.le.ac.uk/departments/health-sciences/extranet/ BGE/genetic-epidemiology/gedownload/information

Tom Palmer (Leicester) Running WinBUGS from Stata 5 / 24

slide-12
SLIDE 12

The winbugsfromstata package

Tom Palmer (Leicester) Running WinBUGS from Stata 6 / 24

slide-13
SLIDE 13

How to run an analysis

Tom Palmer (Leicester) Running WinBUGS from Stata 7 / 24

slide-14
SLIDE 14

help winbugs

Tom Palmer (Leicester) Running WinBUGS from Stata 8 / 24

slide-15
SLIDE 15

Example analysis: Schools

Schools example [Goldstein et al., 1993],[Spiegelhalter et al., 2004]

Tom Palmer (Leicester) Running WinBUGS from Stata 9 / 24

slide-16
SLIDE 16

Example analysis: Schools

Schools example [Goldstein et al., 1993],[Spiegelhalter et al., 2004] Between-school variation in exam results from inner London schools

Tom Palmer (Leicester) Running WinBUGS from Stata 9 / 24

slide-17
SLIDE 17

Example analysis: Schools

Schools example [Goldstein et al., 1993],[Spiegelhalter et al., 2004] Between-school variation in exam results from inner London schools Standardized mean scores (Y ) 1,978 pupils, 38 schools

Tom Palmer (Leicester) Running WinBUGS from Stata 9 / 24

slide-18
SLIDE 18

Example analysis: Schools

Schools example [Goldstein et al., 1993],[Spiegelhalter et al., 2004] Between-school variation in exam results from inner London schools Standardized mean scores (Y ) 1,978 pupils, 38 schools LRT: London Reading Test, VR: verbal reasoning, Gender intake of school, denomination of school

Tom Palmer (Leicester) Running WinBUGS from Stata 9 / 24

slide-19
SLIDE 19

Data for the Schools example

Tom Palmer (Leicester) Running WinBUGS from Stata 10 / 24