From: Sparapani, R. <rsp...@mc...> - 2007-09-13 14:32:39
|
I replied again last night, but it never got to the list. I HATE = OUTLOOK WEB ACCESS!!!! =20 Ok, 2.1-6 does work. Here's what I tested: > = Sys.setenv(WINE=3D"/Applications/Darwine/Wine.bundle/Contents/bin/wine") > = Sys.setenv(WINEPATH=3D"/Applications/Darwine/Wine.bundle/Contents/bin/win= epath") > schools.sim <- bugs (data=3Ddata, inits=3Dinits, parameters.to.save=3Dparameters, model.file=3D"schools.txt", n.chains=3D3, n.iter=3D1000, bugs.directory=3D"/Applications/WinBUGS14", debug=3DFALSE) However, fitbugs() does not work. Since bugs() no longer needs = WINE/WINEPATH/etc., that should not be the issue. It seems like fitbugs does not know about = bugs.directory!?! Here's what it looks like: > source("fitbugs.R") > .schools.bugs.model <- function () { # data : J, y, sigma.y # param : theta, mu.theta, sigma.theta # theta =3D rnorm(1) # mu.theta =3D rnorm(1) # sigma.theta =3D runif(1) for (j in 1:J){ y[j] ~ dnorm (theta[j], tau.y[j]) theta[j] ~ dnorm (mu.theta, tau.theta) tau.y[j] <- pow(sigma.y[j], -2) } mu.theta ~ dnorm (0, 1.0E-6) tau.theta <- pow(sigma.theta, -2) sigma.theta ~ dunif (0, 1000) } > fitbugs(.schools.bugs.model, = bugs.directory=3D"/Applications/WinBUGS14") Error in file(con, "rb") : unable to open connection In addition: Warning message: cannot open file '/Users/rsparapa/.wine/dosdevices/c:/Program = Files/WinBUGS14/System/Rsrc/Registry.odc', reason 'No such file or = directory' in: file(con, "rb")=20 Error in bugs.run(n.burnin, bugs.directory, WINE =3D WINE, useWINE =3D = useWINE, :=20 WinBUGS executable does not exist in = /Users/rsparapa/.wine/dosdevices/c:/Program Files/WinBUGS14 In addition: Warning message: list.files: '/Users/rsparapa/.wine/dosdevices/c:/Program = Files/WinBUGS14' is not a readable directory in: = list.files(bugs.directory)=20 Any ideas? I tried to add bugs.directory to fitbugs.R, but I'm not = getting the syntax right. Rodney -----Original Message----- From: Gorjanc Gregor [mailto:Gre...@bf...] Sent: Wed 9/12/2007 1:54 AM To: Sparapani, Rodney; bug...@li... Subject: RE: [Bugs-r-devel] Recent changes =20 Hi Rodney > I can now confirm that the example that recently appeared on > BUGS-L works with R2WinBUGS 2.1-4, > DarWINE 0.9.42 and WinBUGS 1.4.3 if I do the following first: > > Sys.setenv(DISPLAY=3D":0.0") I tried to unset the DISPLAY variable on my Ubunutu box and I also was = not able to run the example (R2WinBUGS 2.1-6). Setting it back to :0.0 = worked. > However, it does not work with OpenBUGS 3.0.1 or 3.0.2. Also, It can not work, since OpenBUGS has slightly different model syntax. = rbugs has implemented it and I would like to port that to R2WinBUGS - though = we might just go via BRugs since Bob announced that OpenBUGS should now work also under Linux. Stay tunned ;) > DarWINE 0.9.43 and 0.9.44 have some problems as well. Any meaningful error message? > Now, how do I install the latest trunk to do the same test? > I've downloaded it, but there does not appear to be a .tgz file. Just build it. I guess mac side should not be much different from R CMD build R2WinBUGS Regards, Gregor |