Questions tagged [runjags]

runjags: Interface Utilities, Model Templates, Parallel Computing Methods and Additional Distributions for MCMC Models in JAGS

User-friendly interface utilities for MCMC models via Just Another Gibbs Sampler (JAGS), facilitating the use of parallel (or distributed) processors for multiple chains, automated control of convergence and sample length diagnostics, and evaluation of the performance of a model using drop-k validation or against simulated data. Template model specifications can be generated using a standard lme4-style formula interface to assist users less familiar with the BUGS syntax. A JAGS extension module provides additional distributions including the Pareto family of distributions, the DuMouchel prior and the half-Cauchy prior.

51 questions
0
votes
0 answers

Failed JAGS: Node inconsistant with parents

Hi I am new to jags and I encountered the dreaded 'node inconsistent with parents' problem. I was trying to run my data with a Bayesian integrated SDM following the instructions on Fidino's blog post in R, with an adaptation of changing the…
0
votes
1 answer

JAGS and missing data: Non-imputation solutions?

I am trying to fit a model with an interaction term using the rjags and runjags packages. I encountered the below reproduced error message RUNTIME ERROR: Compilation error on line 4. Possible directed cycle involving ymean and I believe this is due…
jrcalabrese
  • 2,184
  • 3
  • 10
  • 30
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
0
votes
1 answer

In Rjags/runjags, what causes the "node inconsistent with parents" error when using dinterval?

I have wracked my brain trying to come up with a solution to this problem and I'm at wits end! First, the necessary context: Aquatic plants in lakes are sampled with rakes. You throw a rake out into the lake, you pull it back into your boat, and you…
Bajcz
  • 433
  • 5
  • 20
0
votes
0 answers

"runjags" R package run.jags function parallel method. How many cores do the parallel method used?

I have used the run.jags function to perform parallel processing. How many cores have been used during the processing? My computer has 4 cores, can I specify run.jags to use all the 4 cores, only use 2 or 3 cores etc.?
JasonYeung
  • 23
  • 2
0
votes
1 answer

Update number of observations in each simulation (using libraries: runjags, parallel)

I am splitting my dataset by simulation ID and applying a runjags functions to each subsest simultaneously. Right now, each simulation contains 1000 observations. I know that sometimes the number of observations will differ since I will be dropping…
thewan
  • 27
  • 4
0
votes
0 answers

Obtain coda files from runjags when I know that some simulations fail

I am splitting my dataset by simulation ID and applying a runjags function simultaneously to each of these subdatasets. This allows me to take advantage of parallel processing and run my simulation on a cluster. A job that takes over 1 day can be…
thewan
  • 27
  • 4
0
votes
3 answers

RUNTIME ERROR: Index out of range taking subset of theta

I have a data frame that looks like this: y s 1 cat 0 cat 0 dog 0 dog 0 dog 0 dog 0 dog 0 dog 0 dog 1 dog 1 cat 0 dog 0 dog 1 dog 0 dog 1 dog 0 dog 0 dog 0 dog 0 dog 0 dog 0 dog 1 cat 1 dog 0 cat 1…
0
votes
1 answer

How to specify nested model

I am using runjags to model some hierarchical data. I can model one level of the hierarchy but I do not know how to extend it to more levels. I am trying to do this using method 3 from page 24 of "Bayesian Hierarchical Modelling using WinBUGS", by…
user2957945
  • 2,353
  • 2
  • 21
  • 40
0
votes
0 answers

extract(model, what = dic) from JAGS model returns NA for penalty

Using JAGS, I am fitting different models to data and would like to compare their fits using the deviance information criterion (DIC). I am using "run.jags" to fit a model and then "extract" to determine the DIC for the model after it runs. My…
0
votes
1 answer

Run Jags - extract multiple realisations from mcmc object

I have a runjags script that generates predicted burrow density for every cell on an island. I’m looking to obtain multiple draws (around 100) from an mcmc object for every cell. My dissertation supervisor thinks I should be able to do this using…
Bong112
  • 161
  • 10
0
votes
1 answer

Outcome prediction using JAGS from R

[Code is updated and does not correspond to error messages anymore] I am trying to understand how JAGS predicts outcome values (for a mixed markov model). I've trained the model on a dataset which includes outcome m and covariates x1, x2 and…
Rnout
  • 29
  • 7
0
votes
0 answers

RJags "Unable to Find Appropriate Sampler"

I'm trying to model the sizes of tortoise burrows using Line-Transect Distance Sampling and data augmentation. However, I keep getting the error "unable to find appropriate sampler." Some background: Burrows can be from 4cm to 55cm wide and are…
Heather G.
  • 53
  • 5
0
votes
1 answer

Large Monitor List for runjags

With runjags, I am trying to monitor a very large number of values. The format for the monitor list is a string of values, In this case I am asking to moitor just 3, Y[14], Y[15],…
Nathan White
  • 134
  • 6
0
votes
1 answer

Separate Bayesian parameter estimates for multiple groups in JAGS/rjags

I am trying to perform a hierarchical analysis in JAGS, extrapolating from Kruschke's Doing Bayesian Data Analysis, chapter 9. I wish to obtain posterior parameter estimates for the proportion of heads for four coins (theta's 1,2,3 and 4), coming…
llewmills
  • 2,959
  • 3
  • 31
  • 58