On 12.10.2014 15:06, thanoon younis wrote:
Dear all Rusers
I have error when i wanted to call winbugs from R to estamate parameters
using bayesian analysis.

  #Call WinBUGS

model<-bugs(data1,data2,init1,init2,parameters,model.file="D:/Run/model.txt",
     n.chains=2,n.iter=10000,n.burnin=4000,n.thin=1,DIC=True,
     bugs.directory="c:/Program Files/WinBUGS14/",
     working.directory="D:/Run/")

and the error is
#Call WinBUGS

model<-bugs(data1,data2,init1,init2,parameters,model.file="D:/Run/model.txt",
+     n.chains=2,n.iter=10000,n.burnin=4000,n.thin=1,DIC=True,
+     bugs.directory="c:/Program Files/WinBUGS14/",
+     working.directory="D:/Run/")
Error in bugs(data1, data2, init1, init2, parameters, model.file =
"D:/Run/model.txt",  :
   Number of initialized chains (length(inits)) != n.chains

any help would be greatly appreciated



See ?bugs and find that you need to specify exactly one data object and one inits object. The latter can be a list containing inits for each chain.

Best,
Uwe Ligges

______________________________________________
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.

Reply via email to