[R] problem with BRugs
R Heberto Ghezzo, Dr
heberto.ghezzo at mcgill.ca
Mon Aug 24 18:26:55 CEST 2009
Hello, I am sorry, I have this problem before and Uwe send me the answer but I misplaced it and can not find it.
writing a model for BRugs
> library(BRugs)
Loading required package: coda
Loading required package: lattice
Welcome to BRugs running on OpenBUGS version 3.0.3
> setwd("c:/tmp")
Error in setwd("c:/tmp") : cannot change working directory
> mo <- function(){
+ for (k in 1:p){
+ delta[1,k] ~ dnorm(0,0.1)I(,delta[2,k])
Error: unexpected symbol in:
" for (k in 1:p){
delta[1,k] ~ dnorm(0,0.1)I"
> delta[2,k] ~ dnorm(0,0.1)I(delta[1,k],delta[3,k])
Error: unexpected symbol in " delta[2,k] ~ dnorm(0,0.1)I"
> delta[3,k] ~ dnorm(0,0.1)I(delta[2,k],)}
Error: unexpected symbol in " delta[3,k] ~ dnorm(0,0.1)I"
> }
Error: unexpected '}' in "}"
>
so R parser does not like the I(,) construct, What is the alternative way of propgramming the
constrain I(lower,upper)
Thanks
Heberto Ghezzo
More information about the R-help
mailing list