1 / 48

Part 05: Basic Bayes

Part 05: Basic Bayes. TOXOPLASMOSIS RATES (centered). The essential Bayes/Frequentist difference. As a Bayesian you can say, “Conditional on the data, the probability that the parameter is in the interval is 0.95” (you’ve always wanted to be able to say this!). SURGICAL

tab
Download Presentation

Part 05: Basic Bayes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Part 05: Basic Bayes BIO656--Multilevel Models

  2. BIO656--Multilevel Models

  3. BIO656--Multilevel Models

  4. BIO656--Multilevel Models

  5. BIO656--Multilevel Models

  6. BIO656--Multilevel Models

  7. BIO656--Multilevel Models

  8. BIO656--Multilevel Models

  9. BIO656--Multilevel Models

  10. BIO656--Multilevel Models

  11. BIO656--Multilevel Models

  12. BIO656--Multilevel Models

  13. BIO656--Multilevel Models

  14. BIO656--Multilevel Models

  15. BIO656--Multilevel Models

  16. TOXOPLASMOSIS RATES (centered) BIO656--Multilevel Models

  17. The essential Bayes/Frequentist difference • As a Bayesian you can say, “Conditional on the data, • the probability that the parameter is in the interval is 0.95” • (you’ve always wanted to be able to say this!) BIO656--Multilevel Models

  18. BIO656--Multilevel Models

  19. BIO656--Multilevel Models

  20. BIO656--Multilevel Models

  21. BIO656--Multilevel Models

  22. BIO656--Multilevel Models

  23. BIO656--Multilevel Models

  24. BIO656--Multilevel Models

  25. BIO656--Multilevel Models

  26. BIO656--Multilevel Models

  27. BIO656--Multilevel Models

  28. BIO656--Multilevel Models

  29. BIO656--Multilevel Models

  30. BIO656--Multilevel Models

  31. SURGICAL Hospital # of ops # of deaths A [1] 47 0 B 148 18 C 119 8 D 810 46 E 211 8 F 196 13 G 148 9 H 215 31 I 207 14 J 97 8 K 256 29 L 360 24 BIO656--Multilevel Models

  32. “Surgical” Beta-Binomial Model (no combining; stand alone) model { for( i in 1 : N ) { p[i] ~ dbeta(1.0, 1.0) #need to specify the prior r[i] ~ dbin(p[i], n[i]) } righttail<-step(p[1]-3/n[1]) } # Also run with p[i] ~ dbeta(0.25,0.25) BIO656--Multilevel Models

  33. “Surgical” Results for p[1] (no combining; stand alone) Beta mean sd 2.5% median 97.5% (1,1) 0.020 0.019 0.0003 0.0006 0.014 (.25,.25) 0.005 0.010 0.0002 0.0010 0.034 MLE 0 0.078 Beta(.25, .25) Beta(1,1) BIO656--Multilevel Models

  34. Allows learning about the prior BIO656--Multilevel Models

  35. “Surgical” Beta-binomial model (combine evidence; “estimate” the prior) model {for( i in 1 : N ) { b[i] ~ dnorm(mu,tau) # tau = 1/var r[i] ~ dbin(p[i],n[i]) logit(p[i]) <- b[i] } popmn <- exp(mu) / (1 + exp(mu)) mu ~ dnorm(0.0,1.0E-6) sigma <- 1 / sqrt(tau) tau ~ dgamma(alphatau, betatau) mutau<-1 alphatau<-.001 betatau<-alphatau/mutau } BIO656--Multilevel Models

  36. “Surgical” Results (combine evidence) node mean sd 2.5% median 97.5% popmn 0.073 0.010 0.053 0.073 0.095 p[1] 0.053 0.020 0.018 0.052 0.094 BIO656--Multilevel Models

  37. “Surgical” Results for p[1] (stand alone & combine) Beta mean sd 2.5% median 97.5% Comb 0.053 0.020 0.0180 0.0520 0.094 (1,1) 0.020 0.019 0.0003 0.0006 0.014 (.25,.25) 0.005 0.010 0.0002 0.0010 0.034 MLE 0 0.078 .25, .25 1,1 Comb BIO656--Multilevel Models

  38. BACK TO HISTORICAL CONTROLS BIO656--Multilevel Models

  39. BIO656--Multilevel Models

  40. BLOCKER Study deaths/n Treated Control 1 3/38 3/39 2 7/114 14/116 3 5/69 11/93 4 102/1533 27/1520 ..... 20 32/209 40/218 21 27/391 43/364 22 22/680 39/674 BIO656--Multilevel Models

  41. delta = BIO656--Multilevel Models

  42. Meta Analysis on the control probability (pc) (Historical Controls) model { for( i in 1 : Num ) { rc[i] ~ dbin(pc[i], nc[i]) rt[i] ~ dbin(pt[i], nt[i]) logit(pc[i]) <- mu[i] logit(pt[i]) <- mu[i] + delta[i] mu[i] ~ dnorm(d, tau) delta[i] ~ dnorm(0.0,1.0E-5) } d ~ dnorm(0.0,1.0E-6) mutau<-1 alphatau<-.0001 betatau<-alphatau/mutau tau ~ dgamma(alphatau, betatau) delta.new ~ dnorm(d, tau) sigma <- 1 / sqrt(tau) } BIO656--Multilevel Models

  43. Meta Analysis on delta = log(OR) model { for( i in 1 : Num ) { rc[i] ~ dbin(pc[i], nc[i]) rt[i] ~ dbin(pt[i], nt[i]) logit(pc[i]) <- mu[i] logit(pt[i]) <- mu[i] + delta[i] mu[i] ~ dnorm(0.0,1.0E-5) delta[i] ~ dnorm(d, tau) } d ~ dnorm(0.0,1.0E-6) mutau<-1 alphatau<-.0001 betatau<-alphatau/mutau tau ~ dgamma(alphatau, betatau) delta.new ~ dnorm(d, tau) sigma <- 1 / sqrt(tau) } BIO656--Multilevel Models

  44. Blocker MLE: pc = 0.079, pt = 0.077, delta = -0.28 Meta-analysis on delta node mean sd 2.5% median 97.5% pc[1] 0.08684 0.03338 0.03255 0.08207 0.1623 pt[1] 0.06883 0.02772 0.0256 0.06517 0.1321 delta[1] -0.2441 0.126 -0.4995 -0.2479 0.03553 Meta-analysis on pc node mean sd 2.5% median 97.5% pc[1] 0.09164 0.03144 0.04031 0.08749 0.164 pt[1] 0.07797 0.04282 0.01743 0.07022 0.1779 delta[1] -0.2504 0.762 -1.846 -0.2192 1.13 BIO656--Multilevel Models

  45. BIO656--Multilevel Models

  46. BIO656--Multilevel Models

  47. BIO656--Multilevel Models

  48. Summary Carefully specified and applied, the Bayesian approach is very effective in • Structuring designs and analyses • Structuring complicated models and goals • we’ll see more of this in ranking • Incorporating all relevant uncertainties • Improving estimates • Communicating in a more “scientific” manner However, • The approach is no panacea and must be used carefully • Traditional values still apply Space-age methods will not rescue stone-age data BIO656--Multilevel Models

More Related