pumps                 package:rbugs                 R Documentation

_1_0 _P_o_w_e_r _P_l_a_n_t _P_u_m_p_s

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

     10 Power Plant Pumps.

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

     data(pumps)

_F_o_r_m_a_t:

     A data frame with 10 observations on the following 2 variables.

     _t The length of the operation time.

     _x The number of failures.

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

     data(pumps)
     pumps.data <- list(t = pumps$t, x = pumps$x, N = nrow(pumps))
     pumps.model <- file.path(.path.package("rbugs"), "bugs/model", "pumps.bug")
     file.show(pumps.model)
     pumps.inits <- file.path(.path.package("rbugs"), "bugs/inits", "pumps.txt")
     file.show(pumps.inits)
     inits <- list(dget(pumps.inits))
     parameters <- c("theta", "alpha", "beta")

     ## Not run: 
     ## The workingDir must be a directory which can be seen by wine
     ## The nominalWorkingDir gives the directory name recoganizable for
     ## Windows.
     ## The full name of the bugs and wine executables need to set.
     ## In .Renviron, add lines similar to these:
     ##   BUGS="c:/program files/winbugs14/winbugs14.exe"
     ##   WINE="/var/scratch/jyan/wine-20040408/wine" 

     pumps.sim <- rbugs(data = pumps.data, inits, parameters, 
                        pumps.model, n.chains = 1, n.iter = 1000,
                        workingDir="/var/scratch/jyan/c/tmp",
                        bugsWorkingDir="c:/tmp",
                        useWine=TRUE)
     ## End(Not run)

