[brugs manual0]    BRugs User Manual
   
(   the R interface to BUGS   )
   
Version 1.0, June 2004



   Andrew Thomas 1
   

   
1 Dept of Mathematics & Statistics,      
      University of Helsinki
      Helsinki
      Finland

      
      e-mail: ant@rni.helsinki.fi


This manual describes how to use the BRugs software.


Permission and Disclaimer

please click here to read the legal bit

More informally, potential users are reminded to be extremely careful if using this program for serious statistical analysis. We have tested the program on quite a wide set of examples, but be particularly careful with types of model that are currently not featured. If there is a problem,
BRugs might just crash, which is not very good, but it might well carry on and produce answers that are wrong, which is even worse. Please let us know of any successes or failures.

Beware: MCMC sampling can be dangerous!

Contents
    Intoduction to BRugs
   
    The Model Functions
       General properties
      
Specification...
      
Update...
   

    The Inference Functions
       General properties
      
Samples...
      
Summary...
      
Rank...
      
DIC...

    Model Specification Language
       Graphical models
      
Graphs as a formal language
      
The BUGS language: stochastic nodes
      
Censoring and truncation
       Constraints on using certain distributions
       Logical nodes
       Arrays and indexing
       Repeated structures
       Data transformations
       Nested indexing and mixtures
      
Formatting of data

Intoduction to BRugs [top]

BRugs is a collection of R functions that allow users to analys graphical models using MCMC techniques. Most of the R functions in BRugs provide a interface to the BRugs dynamic link library (shared object file). The BRugs dynamic link library is able to make use of many of the WinBUGS components, in particular those components concerned with graphical models and MCMC simulation. BRugs lacks the GUI interface of WinBUGS but is able to use R to create graphical displays of the MCMC simulation. BRugs uses the same model specification language as WinBUGS and the same format for data and initial values. However BRugs always uses plain text files for input inplace of WinBUGS compound documents. The BRugs functions can be split into two groups: those associated with setting up and simulating the graphical model and those associated with making statistical inference. In general the R functions in BRugs correspond to the command buttons and and text entry fields in the menus of WinBUGS. Each WinBUGS text entry field splits into two R functions, one to set the quantity and the other to get the value of the quantity.