Skip to content
Prev 327183 / 398502 Next

Error from running R2WinBUGS in R

Several problems:

1. You havbe an object called "matrix", that actually is a list of two 
data.frames. WinBUGS does not know about data,frames. You have to 
provide a matrix here, hence

bugs(....., data=list(Y=as.matrix(Y), Nf=5, ....), ....)


2. In your model file, you have

gamma[1:2 ]
T[1:2 ,1:2 ])
n
an others, all of which need to be passed to WinBUGS as data. I do not 
see a dingle of these objects to be defined anywhere.

3. Then you have

   parameters.to.save = c("p","rho","sigma2")
but these are not mentioned in the model file,

So this is rather hopeless. My suggestion is to seek advice from a local 
BUGS expert or from the BUGS mailing list.

You should start to develop your model in BUSG directly, since the R 
interface is nice for automation, but not for model building, since you 
do not see the error messages as directly as in WinBUGS/OpenBUGS yourself.


Best,
uwe ligges
On 16.07.2013 17:52, Anamika Chaudhuri wrote: