I use both packages in order to do Bayesian analysis but there are some differences that I don't understand:
First of all the package rjags allows the adaptation phase, with the jags.model function, while the package r2jags does not have this phase,…
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…
I'm using the hierarchical modelling framework described by Kruschke to set up a comparison between two models in JAGS. The idea in this framework is to run and compare multiple versions of a model, by specifying each version as one level of a…
I am using R2jags and CODA to produce some diagnostic statistics to my MCMC chains, but I am having trouble. I want to run MCMC as follows:
modelfit <- jags(data=jags.data, inits=jags.inits, model.params, n.iter = 100000,
…
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…
I'm working on fitting a multi-level logistic regression model with group level predictors. I am using JAGS via R. I am getting different behaviors when I fit the model with the runjags versus the R2Jags packages.
I've tried to write a reproducible…
I am still green in handling Bayesian methods.
In a bit to run Bayesian Analysis with a random effect on a real data , I encountered the following error "slicker stuck at value with infinite density", I tried altering the starting values of the…
I am working with the R-package R2jags. After running the code I attach below, R produced the error message: "Node inconsistent with parents".
I tried to solve it. However, the error message persists. The variables I am using are:
i) "Adop": a 0-1…
Each time I run my JAGS model using the jags() function, I get very different values of fitted parameters. However, I want other people to reproduce my results.
I tried to add set.seed(123), but it didn't help. This link describes how to achieve my…
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 <-…
What is the jags equivalent of R's is.na()? I am using r2jags to pass R data objects to jags, and in my jags model, I want to test if an element of a vector contains the equivalent of R's NA value. I don't know what jags "sees" when R says an…
Say we fit a Bayesian linear mixed model using JAGS (or WinBUGS), does the output object include the model residuals? How can we find the residuals?
Thanks!
I have a quick question about the details of running a model in JAGS and BUGS.
Say I run a model with n.burnin=5000, n.iter=5000 and thin=2. Does this mean that the program will:
Run 5,000 iterations, and discard results; and then
Run another…
I would like to install jagsUI on the cluster that I am using. However, this requires me to load JAGS4.3.0 module which I have installed on my computer. This is the error I get when installing jagsUI:
During startup - Warning message:
Setting…
I am super new to JAGS and Bayesian statistics, and have simply been trying to follow the Chapter 22 on Bayesian statistics in Crawley's 2nd Edition R Book. I copy the code down exactly as it appears in the book for the simple linear model: growth =…