I'm trying to run this script in R2jags following the instructions provided in "Lahoz-Monfort JJ, Guillera-Arroita G, Tingley R (2015) Statistical approaches to account for false positive errors in environmental DNA
samples. Molecular Ecology…
I'm quite new to Jags, I'm trying to calculate the model DIC but returned with such error:
Error in jags.model(model.file, data = data, inits = init.values, n.chains = n.chains, :
RUNTIME ERROR:
Compilation error on line 5.
Index out of range…
UPDATE: Now with Traceplot example
UPDATE: Now with new traceplot
I am trying to adapt Outhwaite et. als 2018 code for occupancy modelling and have a couple of questions that I just can't seem to find an answer for...
Code used to create…
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…
I've estimated a huge and complex time-varying hierarchical model in JAGS for time series of hundreds of individuals. I estimate time-varying parameters for individuals leading to 80 parameters per person. The parameters are random effects that…
I have this part of my jags code. I really can't see where the code gets out of the range. Can anyone please see any error that I can't recognize? These are the data sizes.
N = 96
L = c(4,4,4,4,4)
length(media1) = 96
length(weights1) = 4
…
In my model, I have 10 options (from 1-10) for each subject and each trial to choose (expectancy). I calculated the value for each option based on the rule in the graph below, so the value for each option updated based on the difference between…
I have a dataset including three variables including company id (there are 96 companies), expert id (there are 38 experts) and points given by experts to companies. Points are discrete values from 0 to 100. I tried fitting an overdispersed poisson…
It's the first time I'm working with R2Jags, MCM chains and Bayesian models and I'm having trouble to compute the predicted values for my model.
The model is based on research by Hallmann et al. 2017…
I want to use the R2Jags parallel model (jags.parallel) to speed up my computations.
The documentation states I need to recompile the model before updating it. However I get a clear error that I don't know how to handle.
Error message:
Code that…
all,
I'm trying to use JAGS model in R. The R package is "R2jags".
I'm confused with the error like beblow.
Compiling model graph
Resolving undeclared variables
Allocating nodes
Deleting model
Error in jags.model(model.file, data = data, inits =…
I made a model using R2jags. I like the jags syntax but I find the output produced by R2jags not easy to use. I recently read about the rstanarm package. It has many useful functions and is well supported by the tidybayes and bayesplot packages for…
I am trying to run a R program on cluster. In the R program,jags function is called from the package R2jags. If I don't use the cluster and simply use R, then the program works fine. However, when I try to submit a job, then I get the following…
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…
I'm working on a project for an introductory Bayesian analysis course and I'm also fairly new to using R regularly. We are supposed to build a hierarchical model using a data set we found or put together. I put a data set together to analyze the…