Re: [R] BRugs: error when compiling model
Please specify a reproducible example, i.e. what you did exactly, all the way before the error message. Best, Uwe Ligges On 05.08.2013 17:06, Nash, Charles T C wrote: Using: R version 3.0.1 (2013-05-16) -- Good Sport Platform: x86_64-w64-mingw32/x64 (64-bit) OpenBUGS version 3.2.2 rev 1063 BRugs version 0.8-1 Hi there, When using the modelCompile() function in BRugs package I get the following error: Error in handleRes(res) : NA In addition: Warning message: running command 'C:/Program Files/R/R-3.0.1/library/BRugs/exec/BugsHelper.exe C:/Users/cnash/AppData/Local/Temp/RtmpMlFBjk C:/Users/cnash/AppData/Local/Temp/RtmpMlFBjk/trash filef441bdb5e62.bug C:/Users/cnash/AppData/Local/Temp/RtmpMlFBjk/cmds.txt 1' had status 5 The model is as follows: MODEL { for (i in 1:7932) { for (j in 1:2) { Y[i,j] ~ dpois(mu[i, j]) log(mu[i, j])- alpha[j] + log(cars[i]) + V[i,j] + U[i] V[i,j] ~ dnorm(0, tau.un[j]) } } U[1:7932] ~ car.normal(adj[], weights[], num[], tau.spatial) for (k in 1:sumNumNeigh) {weights[k]-1} for(j in 1:2){ alpha[j] ~ dnorm( 0, 0.0001) tau.un[j] ~ dgamma(0.5, 0.0005) sigma.tau[j] - 1/tau.un[j] } tau.spatial ~ dgamma(0.5, 0.0005) sigma.spatial - 1/tau.spatial } There are no NA's in my data, and the model compiles in Openbugs. Could it be an issue with 64bit R? Thanks! Charlie Nash __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] BRugs Error
On 10.02.2013 22:43, David Winsemius wrote: On Feb 10, 2013, at 12:28 PM, Uwe Ligges wrote: On 10.02.2013 21:18, Paul Ossenbruggen wrote: I installed XCode, XQuartz and OpenBUGS on my Mac using WINE. When I tried to test my installation I received the following error. If correct, BRugs does not exist for R 2.15.1. Is there a means to get arrange this problem? Please install BRugs from sources, a Mac binary is not available on CRAN. If he is doing this with WINE doesn't he need a Windows version. Ah, I ignored the wine part. Not sure if BRugs works at all in this case, since you'd need the R under wine as well. Does that work at all? Perhaps better to use R2OpenBUGS in such a case that starts the OPenBUGS under wine control. Uwe Best, Uwe Ligges Thanks Paul The following code is an example from R Help bugs: schools.sim - bugs(data, inits, + parameters, model.file, n.chains=3, + n.iter=1000, + n.thin=10,n.burnin=10,bin=1, + DIC=FALSE,debug=TRUE, + useWINE = TRUE, + program = OpenBUGS, + bugs.directory=c:/ProgramFiles/OpenBUGS/) Is there a missing space in that path? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] BRugs Error
On 10.02.2013 21:18, Paul Ossenbruggen wrote: I installed XCode, XQuartz and OpenBUGS on my Mac using WINE. When I tried to test my installation I received the following error. If correct, BRugs does not exist for R 2.15.1. Is there a means to get arrange this problem? Please install BRugs from sources, a Mac binary is not available on CRAN. Best, Uwe Ligges Thanks Paul The following code is an example from R Help bugs: schools.sim - bugs(data, inits, + parameters, model.file, n.chains=3, + n.iter=1000, + n.thin=10,n.burnin=10,bin=1, + DIC=FALSE,debug=TRUE, + useWINE = TRUE, + program = OpenBUGS, + bugs.directory=c:/ProgramFiles/OpenBUGS/) Loading required package: BRugs Error in openbugs(data, inits, parameters.to.save, model.file, n.chains, : BRugs is required In addition: Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘BRugs’ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] BRugs Error
On Feb 10, 2013, at 12:28 PM, Uwe Ligges wrote: On 10.02.2013 21:18, Paul Ossenbruggen wrote: I installed XCode, XQuartz and OpenBUGS on my Mac using WINE. When I tried to test my installation I received the following error. If correct, BRugs does not exist for R 2.15.1. Is there a means to get arrange this problem? Please install BRugs from sources, a Mac binary is not available on CRAN. If he is doing this with WINE doesn't he need a Windows version. Best, Uwe Ligges Thanks Paul The following code is an example from R Help bugs: schools.sim - bugs(data, inits, + parameters, model.file, n.chains=3, + n.iter=1000, + n.thin=10,n.burnin=10,bin=1, + DIC=FALSE,debug=TRUE, + useWINE = TRUE, + program = OpenBUGS, + bugs.directory=c:/ProgramFiles/OpenBUGS/) Is there a missing space in that path? -- David. Loading required package: BRugs Error in openbugs(data, inits, parameters.to.save, model.file, n.chains, : BRugs is required In addition: Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘BRugs’ David Winsemius, MD Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] BRugs Error
On 10/02/13 21:43, David Winsemius wrote: On Feb 10, 2013, at 12:28 PM, Uwe Ligges wrote: On 10.02.2013 21:18, Paul Ossenbruggen wrote: I installed XCode, XQuartz and OpenBUGS on my Mac using WINE. When I tried to test my installation I received the following error. If correct, BRugs does not exist for R 2.15.1. Is there a means to get arrange this problem? Please install BRugs from sources, a Mac binary is not available on CRAN. If he is doing this with WINE doesn't he need a Windows version. Of what? In theory BRugs on Mac OS X could talk to OpenBUGS running the latter under WINE. Except on 32-bit Windows, BRugs works by running a helper executable that is linked to OpenBUGS. So that helper would need to be compiled under Windows and be run through WINE. Just installing BRugs from the sources on OS X would not achieve that: you would need to build BugsHelper under Windows (possibly via WINE) and alter the BRugs sources to run it via WINE. As others have said on R-sig-mac, it would be almost certainly be simpler to modify your task to run using JAGS via rjags, and most likely simpler to run BRugs under R for Windows using a Windows emulator (WINE might suffice). Best, Uwe Ligges Thanks Paul The following code is an example from R Help bugs: schools.sim - bugs(data, inits, + parameters, model.file, n.chains=3, + n.iter=1000, + n.thin=10,n.burnin=10,bin=1, + DIC=FALSE,debug=TRUE, + useWINE = TRUE, + program = OpenBUGS, + bugs.directory=c:/ProgramFiles/OpenBUGS/) Is there a missing space in that path? -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.