cddesjar wrote:
>
> Hi,
> I am trying to do run the following model saved in "C:/bugs/sus.bug"
>
> model {
> for (i in 1:n){
> y[i] ~ dpois(lamdba[i])
> log(lambda[i]) <- mu+bmale[male[i]]+bschn[schn[i]]+epsilon[i] #
> epsilon[i] ~ dnorm(0,tau.epsilon)
> }
> mu ~ dnorm(0,.0001)
> bmale ~ dnorm(0,.0001)
> tau.epsilon <- pow(sigma.epsilon, -2)
> sigma.epsilon ~ dunif(0,100)
> for (j in 1:n.schn){
> bschn[j] ~ dnorm(0,tau.schn)
> }
> tau.schn <- pow(sigma.schn, -2)
> sigma.schn ~ dunif(0,100)
> }
>
> I am running the following syntax:
> [snip]
> sus.sim <-
> bugs(data,inits,parameters,"C:/bugs/susc.bug",n.chains=3,n.iter=10,debug=TRUE)
>
> And get the following error:
>
> display(log)
> check(C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\Rtmpyg7eDj/susc.bug.txt)
> empty slot not allowed in variable name
>
> [snip]
>
This is an error with your BUGS model, not your R code. (I assume that your
model is really stored in "susc.bug", not "sus.bug" as you say above.)
Do you really mean "lamdba[i]" and not "lambda[i]" in line 3?
Otherwise, I don't know (and you should probably ask the question on
a BUGS list rather than an R list ...)
Ben Bolker
--
View this message in context:
http://www.nabble.com/Error-with-r2winbugs-tp24520746p24525264.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help@r-project.org mailing list
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.