Hi, I am trying to run the following model for OpenBUGS and want to use R2OpenBUGS package. The model specifies weibull distribution for censored data.
weibull.model <- function() { for(i in 1:n) { exp.alpha[i] ~ dgamma(a.alpha, b.alpha) alpha[i] <- log(exp.alpha[i]) linear.part[i] <- alpha[i] + inprod(nu[ ], x[i, ]) lambda[i] <- exp(linear.part[i]) time[i] ~ (dweib(shape, lambda[i]) C(censored.time[i], )) } shape ~ dgamma(a.shape, b.shape) for(j in 1:p) { beta[j] ~ dnorm(prior.mean, prior.tau) gamma[j] ~ dbern(pi[j]) pi[j] ~ dbeta(1, 1) nu[j] <- beta[j] * gamma[j] } } But R is throwing the following error. Error: unexpected symbol in: " time[i] ~ (dweib(shape, lambda[i]) C" Any help regarding this will be appreciated. Thanks & Regards, Arnab Arnab Kumar Maity Graduate Teaching Assistant Division of Statistics Northern Illinois University DeKalb, IL 60115 Email: ma...@math.niu.edu Ph: 779-777-3428 -- View this message in context: http://r.789695.n4.nabble.com/Censoring-in-R2OpenBUGS-tp4703160.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.