mo123
mo123

Reputation: 1

Bayesian multilevel model with R2WINBUGS

data <-
list("N","J","K","pa","unit","hosp","tech","teach","beds","unitsur","we","expe",
"full")

 inits1<-list(p0=0.1,tau1=0,tau2=0, beta =c(1,1,1,1,1,1,1,1))
inits2<-list(p0=0.5,tau1=1,tau2=1, beta =c(1,1,1,1,1,1,1,1))
data.inits<-list(inits1, inits2)

## Parameters to estimate
parameters <- c("beta", "tau1","tau2", "p0")

Burnout.sim=bugs(data, inits=data.inits, parameters, "Burnoutmodel.txt",
n.chains = 2, n.iter = 1000,    
bugs.directory="C:/Users/molasey/Desktop/WINBUGS/winbugs14/WinBUGS14/", 
debug=TRUE)

When I run the above code using the library(R2WINBUGS), the winbugs panel displays the following message:

expected collection operator c compile(2) inits(1,C:/Users/molasey/AppData/Local/Temp/RtmpmAA9bi/inits1.txt) command #Bugs:inits cannot be executed (is greyed out)

Help me out pls.

Upvotes: 0

Views: 112

Answers (0)

Related Questions