0

I'm running JAGS with R v3.6.1 and Rstudio v1.2 in Windows 10, using package R2jags. JAGS does not appear to find the stored values that I've created in R for MCMC settings such as n.iter, n.burn-in, etc. because my code:

    out2 <- jags.parallel (data = data, inits = inits, parameters.to.save = parameters, 
model.file  = "C:\\Users\\jj1995\\Desktop\\VIP\\Thanakorn\\DLM\\district model.txt", n.chains = n.chain,
 n.thin = n.thin, n.iter = n.iter, n.burnin = n.burn)

Produces the error

Error in checkForRemoteErrors(lapply(cl, recvResult)) : 
  3 nodes produced errors; first error: object 'n.burn' not found 

If I replace a stored value's name with a number (n.burnin = 10000), it will return the same error, but for a different MCMC setting. I assume JAGS will also be unable to find the lists and dataframes I've stored in the global environment also. I thought my system's firewall was preventing JAGS from accessing the global environment, so I disabled my antivirus measures and I ran both R and Rstudio as an administrator. This did not solve the problem.

jj1995
  • 1
  • Could you post your JAGS model code? Is everything within the model code passed in as a named item within "data"? – Zoey RW Feb 27 '20 at 21:40
  • Thank you Zoey RW. Some stored-value parameters were left out of "data". When I included them in the list, all parameters were found. – jj1995 Feb 28 '20 at 20:33
  • Awesome, glad it worked! There's definitely a learning curve for JAGS. – Zoey RW Mar 01 '20 at 17:59

0 Answers0