rbugs                 package:rbugs                 R Documentation

_R_u_n _B_U_G_S _f_r_o_m _R _i_n _a _B_A_T_C_H

_D_e_s_c_r_i_p_t_i_o_n:

     Generate files (data, init, script) that are necessary to run
     BUGS, call BUGS through the OS, and collect the MCMC output.

_U_s_a_g_e:

     rbugs(data, inits, paramSet, model,
           n.chains = 1, n.iter = 2000, n.burnin = floor(n.iter/2),
           n.thin = max(1, floor(n.chains * (n.iter - n.burnin)/1000)),
           dic = FALSE,
           debug = FALSE,
           bugs = Sys.getenv("BUGS"),
           workingDir = NULL, 
           bugsWorkingDir,
           useWine = FALSE, wine = Sys.getenv("WINE"),
           linbugs = TRUE, 
           cleanBugsWorkingDir = FALSE,
           genFilesOnly = FALSE,
           verbose = FALSE, seed = 314159)

_A_r_g_u_m_e_n_t_s:

    data: a list of data object to be used by BUGS 

   inits: a list of list of initial values, or a function which returns
          a list of initial values 

paramSet: a vector of the names of the parameters to be monitored 

   model: the file name of the model description 

n.chains: the number of chains to be monitored 

  n.iter: the number of iteration of each chain 

n.burnin: the length of the burn-in 

  n.thin: thinning rate 

     dic: if TRUE, dic will be monitored 

   debug: a logical value indicating whether or not closing the BUGS
          window 

    bugs: the full name (including the path) of the BUGS executable 

workingDir: a directory to store all the intermediate files 

bugsWorkingDir: required, the nominal name of the working directory,
          which is the same as workingDir if useWine is "FALSE". If
          useWine is "TRUE", it should be a directory which is
          recognizable by the Windows system though wine. 

 useWine: a logical value with "TRUE" meaning wine is used 

    wine: if useWine==TRUE, the full name of wine 

 linbugs: if TRUE, linbugs is used 

cleanBugsWorkingDir: if TRUE, the generated files will be removed from
          the bugsWorkingDir

genFilesOnly: If TRUE, the script, data, inits, and model files will be
          generated but not run. 

 verbose: if TRUE, print the log file from BUGS

    seed: an interger of random number seed

_V_a_l_u_e:

     A list of MCMC outputs with length 'nChains'.

_A_u_t_h_o_r(_s):

     Jun Yan jyan@stat.uiowa.edu

_E_x_a_m_p_l_e_s:

     ## see examples in this-is-escaped-code{ and 'schools'

