Hi guys
I'm new at R language and I have a script compiling problem.
I'm trying to compile this script:
###
model_logistic
{
for (i in 1:N)
{Y[i]~ dbin(theta[i], 1)
logit(theta[i] <- beta.0+beta.1*X[i]}
}
beta.0 ~ dnorm(0, 0.0001)
beta.1 ~ dnorm(0, 0.0001)
or <-exp(beta.1)
}
###
by typing:
> source("question2bis_code.R")
But it gives me this error:
Error in source("question2bis_code.R") :
question2bis_code.R:7:45: unexpected '}'
{Y[i]~ dbin(theta[i], 1)
logit(theta[i] <- beta.0+beta.1*X[i]}
Why do I get this?
Why this error?
Thanx
ProgrammingR offers two ways for you to stay up to date. To be notified when new articles and book reviews are posted, subscribe to the general ProgrammingR RSS feed by clicking here. To be notified when new R-based job listings are posted, click here.



