Re: [R] Winbugs from R

2012-12-04 Thread Bob O'Hara
This is a BUGS problem, not an R problem, so would be better asked on the BUGS list (a practical hint: if it's not working through R, run the code directly in BUGS: the error reporting is better). Anyway, here BUGS manages to tell R to tell you what's wrong: variable n is not defined And looking

[R] Winbugs from R

2012-12-04 Thread Günal Bilek
Hi, I am trying to covert a Winbugs code into R code. Here is the winbugs code model{# model’s likelihoodfor (i in 1:n){time[i] ~ dnorm( mu[i], tau ) # stochastic componenent# link and linear predictormu[i] <- beta0 + beta1 * cases[i] + beta2 * distance[i]}# prior distributionstau ~ dgamma( 0.01