Questions tagged [jags.parallel]

For questions about `jags.parallel`, an R function from R2jags package that allows parallel computation of MCMC chains.

jags.parallel is an function from R2jags package that allows parallel computation of MCMC chains.

5 questions
5
votes
2 answers

jags.parallel - Error in get(name, envir = envir) : invalid first argument

When using jags.parallel, I get the following error: > out <- jags.parallel(win.data, inits, params, "Poisson.OD.t.test.txt", + nc, ni, nb, nt); Error in get(name, envir = envir) : invalid first argument The same call using jags function runs OK. I…
Tomas
  • 57,621
  • 49
  • 238
  • 373
4
votes
1 answer

strange jags.parallel error / avoiding lazy evaluation in function call

I have a function call (to jags.parallel) that works when given a numerical argument like n.iter = 100 but fails when the argument uses a variable value, n.iter = n.iter. This looks like it might be a bug in jags.parallel A minimal reproducible…
cboettig
  • 12,377
  • 13
  • 70
  • 113
3
votes
4 answers

Using jags.parallel from within a function (R language Error in get(name, envir = envir) : object 'y' not found)

Using jags.parallel from the command line or a script works fine. I can run this modified example from http://www.inside-r.org/packages/cran/R2jags/docs/jags just fine # An example model file is given in: model.file <-…
goryh
  • 215
  • 1
  • 4
  • 14
3
votes
0 answers

jags.parallel: setting less clusters than chains: "Error in res[[ch]] : subscript out of bounds"

I have only 2 core CPU so logically I want to set only two parallel threads/clusters for jags.parallel. unfortunatelly, when I try it and the number of chains is 3 or 4, jags fails with an error: Error in res[[ch]] : subscript out of bounds Is…
Tomas
  • 57,621
  • 49
  • 238
  • 373
0
votes
1 answer

Question about array multiplication in JAGS

I am working with race-stratified population estimates and I want to integrate race-stratified populations from three different data sources (census, PEP, and ACS). I developed a model to use information from all these three sources and estimate the…
Emily
  • 1