Appendix AWinBUGS

BUGS and WINBUGS are distributed freely and are the result of many years of development by a team of statisticians and programmers at the Medical Research Council Biostatistics Research Unit in Cambridge (BUGS and WinBUGS) and recently by a team at University of Helsinki (OpenBUGS); see the project pages:

monospace http colon slash slash www period mrc hyphen bsu period cam period ac period uk slash bugs slash

and

monospace http colon slash slash mathstat period helsinki period fi slash openbugs slash period

Models are represented by a flexible language, and there is also a graphical feature, DOODLEBUGS, which allows users to specify their models as directed graphs. For complex models the DOODLEBUGS can be very useful. As of May 2007, the latest version of WinBUGS is 1.4.1, and OpenBUGS 3.0.

A.1 Using WinBUGS

We start the introduction to WinBUGS with a simple regression example. Consider the model

StartLayout 1st Row 1st Column y Subscript i Baseline vertical-bar mu Subscript i Baseline comma normal tau 2nd Column tilde 3rd Column script í’© left-parenthesis mu Subscript i Baseline comma normal tau right-parenthesis comma i equals 1 comma ellipsis comma n comma 2nd Row 1st Column mu Subscript i 2nd Column equals 3rd Column normal alpha plus normal beta left-parenthesis x Subscript i Baseline minus x overbar right-parenthesis comma 3rd Row 1st Column normal alpha 2nd Column tilde 3rd Column script í’© left-parenthesis 0 comma 1 0 Superscript negative 4 Baseline right-parenthesis comma 4th Row 1st Column normal beta 2nd Column tilde 3rd Column script í’© left-parenthesis 0 comma 1 0 Superscript negative 4 Baseline right-parenthesis comma 5th Row 1st Column normal tau 2nd Column tilde 3rd Column script í’¢ a m m a left-parenthesis 0.001 comma 0.001 right-parenthesis period EndLayout

The scale in normal distributions here is parameterized in terms of a precision parameter normal tau that is the reciprocal of variance, normal tau equals 1 slash normal sigma squared period Natural distributions for the precision parameters are gamma, and small values of the precision reflect the flatness (noninformativeness) ...

Get Nonparametric Statistics with Applications to Science and Engineering with R, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.