[R-sig-Geo] Help - calling OpenBugs through R2OpenBugs problem
Virgilio Gómez-Rubio
virgilio.gomez at uclm.es
Fri Nov 29 10:43:03 CET 2013
Dear James,
I have been able to run your code. See attached files. Not sure why
OpenBUGS crashed but I found a few strange symbols (vertical bars) when
I copied and pasted your model from your e-mail. OpenBUGS complained and
it worked fine after I had these symbols removed.
I have run it on an Ubuntu Linux, with R version 3.0.2 Patched
(2013-10-25 r64109). I have used wine to run OpenBUGS, so you may need
to change that in my code. Please, try the code attached on the latest R
you can find.
If you have any particular problem when running my code, please, contact
me off-list so that we can reduce the noise of this list.
Best wishes,
Virgilio
-------------- next part --------------
model
{
for(i in 1:N)
{
observed[i]~dpois(mu[i])
log(theta[i])<-alpha + u[i] + v[i]
mu[i]<-expected[i]*theta[i]
u[i] ~dnorm(0,tau)
}
v[1:N]~car.normal(adj[],weights[],num[],precv)
alpha ~dflat()
tau ~dgamma(0.001,0.001)
precv ~dgamma(0.1,0.1)
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testOpenBUGS.R
Type: text/x-r-source
Size: 1372 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20131129/6a126a3b/attachment.bin>
More information about the R-sig-Geo
mailing list