Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201977

what is the reason for this error in BRugs package of R

$
0
0

I am trying to use the BRugs package in R to do MCMC. I used it normally in windows, But when I used it the same way in linux, there is a same error message once I am running the function modelCheck, modelData or modelCompile. I do not know the reason for it. It seems that I just cannot use function related to Openbugs in R.

library("BRugs")

Welcome to BRugs connected to OpenBUGS version 3.2.3

n<-100

sigm2<-1

u<-rnorm(1,0,2)

y<-rnorm(n,u,sigm2)

modelstring = "# THE MODEL.

model {

Likelihood:

for( i in 1 : nData ) {

y[i] ~ dnorm( u0,1 )

}

prior distribution

u0 ~ dnorm( 0 , 2 )

} "

Write the modelString to a file, using R commands:

writeLines(modelstring,con="model.txt")

modelCheck( "model.txt" )

BugsHelper: BugsHelper.c:300: main: Assertion `stat(cmdfile, &buf) != -1' failed.

****** Sorry something went wrong ******

Error in file(con, "r") : cannot open the connection

In addition: Warning message:

In file(con, "r") :

cannot open file '/tmp/RtmpyK4VFK/buffer.txt': No such file or directory


Viewing all articles
Browse latest Browse all 201977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>