[R] BRugs: error when compiling model

Nash, Charles T C charles.nash at imperial.ac.uk
Mon Aug 5 17:06:14 CEST 2013


Using:

R version 3.0.1 (2013-05-16) -- "Good Sport"
Platform: x86_64-w64-mingw32/x64 (64-bit)
OpenBUGS version 3.2.2 rev 1063
BRugs version 0.8-1


Hi there,

When using the modelCompile() function in BRugs package I get the following error:

Error in handleRes(res) : NA
In addition: Warning message:
running command '"C:/Program Files/R/R-3.0.1/library/BRugs/exec/BugsHelper.exe" "C:/Users/cnash/AppData/Local/Temp/RtmpMlFBjk" "C:/Users/cnash/AppData/Local/Temp/RtmpMlFBjk/trash" "filef441bdb5e62.bug" "C:/Users/cnash/AppData/Local/Temp/RtmpMlFBjk/cmds.txt" "1"' had status 5

The model is as follows:

MODEL {
for (i in 1:7932) {
                     for (j in 1:2) {
                                       Y[i,j] ~ dpois(mu[i, j])
                                       log(mu[i, j])    <-  alpha[j] + log(cars[i])  + V[i,j]   + U[i] 
                                
                                       V[i,j] ~   dnorm(0, tau.un[j])    

                                        } 
                             }                                    
                            
U[1:7932] ~ car.normal(adj[], weights[], num[], tau.spatial)   
for (k in 1:sumNumNeigh) {weights[k]<-1}


for(j in 1:2){
              alpha[j] ~ dnorm( 0, 0.0001)          
              tau.un[j] ~ dgamma(0.5, 0.0005)
              sigma.tau[j] <- 1/tau.un[j]
                   }

tau.spatial ~ dgamma(0.5, 0.0005)
sigma.spatial <- 1/tau.spatial                   

}

There are no NA's in my data, and the model compiles in Openbugs. Could it be an issue with 64bit R?

Thanks!

Charlie Nash



More information about the R-help mailing list