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 -- Thanoon Y. Thanoon PhD Candidate Department of Mathematical Sciences Faculty of Science University Technology Malaysia, UTM E.Mail: Thanoon.younis80 at gmail.com E.Mail: dawn_prayer80 at yahoo.com Facebook:Thanoon Younis AL-Shakerchy Twitter: Thanoon Alshakerchy H.P:00601127550205 [[alternative HTML version deleted]]
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