winbugs14

“Multiple definition of node a” error in Winbugs

点点圈 提交于 2019-12-02 11:48:31
okay i just rewrite my code. Now the problem is when i compile it, I get an error of "multiple definition of node a" . Do anyone know what wrong in my code. I create the variable a,b and c for the model not to have many constants. model{ for(i in 1:n){ a <- (k[1] + step(s1[i]-.9)*k[2] + step(s1[i]*.5-.9)*k[3]) b <- (r[1] + step(s2[i]-.9)*r[2] + step(s2[i]*.5-.9)*r[3]) c <- (s[1] + step(s3[i]-.9)*s[2] + step(s3[i]*.5-.9)*s[3]) dummy[i] <- 0 dummy[i] ~ dloglik(logLike[i]) # This is the log transformation of the 3-variate poisson logLike[i] <- -theta12[i] + a*log(theta12[i]) - logfact(a) -theta13