CDOoDocuments.StdDocumentDescDocuments.DocumentDescContainers.ViewDescViews.ViewDescStores.StoreDesck>Documents.ModelDescContainers.ModelDescModels.ModelDescStores.ElemDesc= =TextViews.StdViewDescTextViews.ViewDesc[=TextModels.StdModelDescTextModels.ModelDescN<F<X0TextModels.AttributesDesc2Arial*uTTextRulers.StdRulerDescTextRulers.RulerDescTextRulers.StdStyleDescTextRulers.StyleDescZTextRulers.AttributesDesc$ Zo +Arial 7Arial*uTf]C( Zo 3*w*uTgL Zo"-9*uToaG, Zo 0ArialPS ,*,k 6*M J*PS j*9 x*uTk]C( Zo AArialPS36 DoodleViews.ViewDescDoodleModels.ModelDesc`=@~+`6i1Nn[i] p[i]1.01.0z r[i]zArial|ArialD[6 d<  c@  +5(  tl 2Arial*uTneK0 Zo @H ArialPSk model { for( i in 1 : N ) { p[i] ~ dbeta(1.0, 1.0) r[i] ~ dbin(p[i], n[i]) } } TextControllers.StdCtrlDescTextControllers.ControllerDescContainers.ControllerDescControllers.ControllerDesc aY?$ Zo Arial*uTjaG, Zo +Arial 8*|.StdFolds.FoldDesc  o6 */ click on one of the arrows to open the data 7Arial||.5  |.  y6 *9 click on one of the arrows to open the initial values J|.  qArialf1+  @SymbolPSo GSymbol *uTaG, Zo 4*uTr]C( ZoW6}@w l<`/4i1Nb2)`=a `=n[i]`/4`6p[i]#`6r[i]#+Arial|ArialD[W6d  Um aR =*PS,N7# E+ ME: Arial  aY?$ Zo Arial*uT]C( Zo |.  }: Arial9 click on one of the arrows to open the initial values J|.?     *uTeK0 Zo @HX|  7 .**uTtmGo Z%$.6?HLQ *: node mean sd MC error 2.5% median 97.5% start sample p[1] 0.02032 0.01989 1.95E-4 5.62E-4 0.01443 0.07396 1001 10000 p[2] 0.1267 0.02674 2.634E-4 0.07905 0.125 0.1849 1001 10000 p[3] 0.07441 0.02414 2.263E-4 0.03388 0.07197 0.1285 1001 10000 p[4] 0.0579 0.008179 9.032E-5 0.04291 0.05751 0.07502 1001 10000 p[5] 0.0421 0.01378 1.434E-4 0.01993 0.04048 0.0736 1001 10000 p[6] 0.07082 0.01805 1.862E-4 0.03966 0.06951 0.1095 1001 10000 p[7] 0.06681 0.02036 2.058E-4 0.03209 0.06505 0.1116 1001 10000 p[8] 0.1475 0.02409 2.136E-4 0.1034 0.1465 0.1973 1001 10000 p[9] 0.07181 0.01781 1.89E-4 0.04072 0.0703 0.1099 1001 10000 p[10] 0.09129 0.02921 2.638E-4 0.04221 0.08845 0.1553 1001 10000 p[11] 0.1164 0.01996 2.042E-4 0.08016 0.1155 0.1579 1001 10000 p[12] 0.06925 0.01323 1.434E-4 0.04554 0.06839 0.09723 1001 10000  aY?$ ZGo **uTeK0 Zo @H&*uTzeK0 Zo @HX.  7 .**uTtmGo Z%$.6?HLQ *:e node mean sd MC error 2.5% median 97.5% start sample mu -2.554 0.1524 0.002556 -2.877 -2.547 -2.27 1001 10000 p[1] 0.05339 0.01949 3.605E-4 0.0183 0.05288 0.09332 1001 10000 p[2] 0.1032 0.02207 2.985E-4 0.06643 0.1011 0.1527 1001 10000 p[3] 0.07053 0.01718 2.089E-4 0.0404 0.06958 0.1073 1001 10000 p[4] 0.05937 0.007905 1.148E-4 0.04484 0.05904 0.07583 1001 10000 p[5] 0.05181 0.01327 2.429E-4 0.02797 0.05114 0.08004 1001 10000 p[6] 0.06956 0.01475 1.598E-4 0.04355 0.0686 0.1014 1001 10000 p[7] 0.06671 0.01582 1.967E-4 0.03879 0.0655 0.1008 1001 10000 p[8] 0.123 0.02208 4.144E-4 0.08326 0.1219 0.1696 1001 10000 p[9] 0.06993 0.01463 1.779E-4 0.04388 0.0691 0.1017 1001 10000 p[10] 0.07854 0.01998 1.95E-4 0.04476 0.07686 0.1232 1001 10000 p[11] 0.102 0.0175 2.548E-4 0.07154 0.1008 0.1397 1001 10000 p[12] 0.06857 0.0118 1.183E-4 0.04716 0.06799 0.09341 1001 10000 pop.mean 0.07283 0.01013 1.693E-4 0.05333 0.07263 0.09365 1001 10000 sigma 0.4021 0.1577 0.003781 0.159 0.379 0.7801 1001 10000  aY?$ ZGo * 7Arial*uT]C( Zo_wa*uT]C( Zo TSLvp   .*s&9RanksDensity.ViewDescp[1] qh?M O?&S???N@?C6?v/?lV}?_vO?"u? rh?g?*@@??s&9p[2] MbP?{Gzd?Mbp?y&1|?F%u?JY8?ׁ?;Nё\?]C?EGr?Tt$?z6>?*@@333333??s&9p[3] cZB>?+ h?K??S!uq?X?V/'?N@?46W?C6?ǘ?_vO?J +?Cl?&S?St$?H}m?*@@333333??s&9p[10] tF_?V_?46W?tF_?b48?Zd;?H}}?_LU?*@@?? aY?$ ZGo *Surgical: Institutional ranking This example considers mortality rates in 12 hospitals performing cardiac surgery in babies. The data are shown below.  Hospital No of ops No of deaths __________________________________ A 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  The number of deaths ri for hospital i are modelled as a binary response variable with `true' failure probability pi: ri ~ Binomial(pi, ni) We first assume that the true failure probabilities are independent (i.e.fixed effects) for each hospital. This is equivalent to assuming a standard non-informative prior distribution for the pi's, namely: pi ~ Beta(1.0, 1.0)  Graphical model for fixed effects surgical example:  BUGS language for fixed effects surgical model:   Data  list(n = c(27, 148, 119, 810, 211, 196, 148, 215, 207, 97, 256, 360), r = c(0, 18, 8, 46, 5, 13, 9, 31, 14, 8, 29, 24), N = 12,a=2,b=24) Inits  list(p = c(0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1)) A more realistic model for the surgical data is to assume that the failure rates across hospitals are similar in some way. This is equivalent to specifying a random effects model for the true failure probabilities pi as follows: logit(pi) = bi bi ~ Normal(m, t) Standard non-informative priors are then specified for the population mean (logit) probability of failure, m, and precision, t. Graphical model for random effects surgical example:  BUGS language for random effects surgical model:   Inits  list(p = c( 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1)) Results A burn in of 1000 updates followed by a further 10000 updates gave the following estimates of surgical mortality in each hospital for the fixed effect analysis    and for the random effects analysis  A particular strength of the Markov chain Monte Carlo (Gibbs sampling) approach implemented in BUGS is the ability to make inferences on arbitrary functions of unknown model parameters. For example, we may compute the rank probabilty of failure for each hospital at each iteration. This yields a sample from the posterior distribution of the ranks. The figures below show the posterior ranks for the estimated surgical mortality rate in each hospital for the random effect models. These are obtained by setting the rank monitor for variable p (select the "Rank" option from the "Statistics" menu) after the burn-in phase, and then selecting the "histogram" option from this menu after a further 10000 updates. These distributions illustrate the considerable uncertainty associated with 'league tables': there are only 2 hospitals (H and K) whose intervals exclude the median rank and none whose intervals fall completely within the lower or upper quartiles.  Plots of distribution of ranks of true failure probability for random effects model:   aY?$ Zo Arial ,[ @Documents.ControllerDesc Ws@ [h