I am trying to recreate an Integrated Population Model from Kery & Schaub's book "Bayesian Population Analysis using WinBUGS" in "Chapter 11 – Estimation of Demographic Rates, Population Size, and Projection Matrices from Multiple Data Types Using…
I'm using this tutorial to wrap my head around JAGS code. In the section 'Same model with an additional categorical predictor' it states that "This model includes an interaction between sex and body length". How can I remove this so that there's no…
In one experiment, participants can use a combination of strategy X and Y to solve problems. θ is the weight of X (ranging from 0 to 1, distributed as Beta), which can somehow be inferred from human data (perhaps no need to go into details here).…
I'm working with multilevel models to try and describe different patterns in longitudinal change. Dingemanse et al (2010) describe a 'fanning out' pattern when the random effects are perfectly correlated. However I found that a similar pattern…
I get the following error message whenever I am trying to create a markdown in R:
"Error in jags.model(model.file, data = data, inits = inits.values, n.chains = n.chains, : Nothing to compile calls: ... withVisible -> eval -> jags ->…
When using JAGS, how does one receive output from a model in the format:
Inference for Bugs model at "model.txt", fit using jags,
3 chains, each with 10000 iterations (first 5000 discarded)
n.sims = 15000 iterations saved
mu.vect sd.vect 2.5% 25%…
I am running a logistic model by rjags, but the error always happens (see below) and I felt my codes contain everything needed and they are logical, so up to now I can't detect the mistake in my codes. here is the error
Error in…
Is it possible to misuse JAGS as a tool for generating data from a model with known parameters? I need to sample data points from a predefined model in order to do a simulation study and test the power of a model I have developed in…
I am running JAGS models through the R package runjags. I just updated to JAGS 4.0.0 from JAGS 3.4, and have noticed some unexpected behavior that seems to be related to the update.
First, when I run a model, I now get a warning message WARNING:…
I am trying to use PyMC to take as input four different predictors of a medical condition, and combine them to yield an overall posterior probability that the patient has the condition given the subset of predictors that say "yes, this patient has…
I've read the JAGS manual but did not find a way to assign the same prior distribution to multiple parameters in a JAGS / R2JAGS model.
For example, currently I have to repeat a lot of code like this:
reg.model <- function() {
# Model structure
…
I've just switched from R2jags from R2OpenBUGS, and have noticed something I don't understand. After running the simulation using jags() and converting the output using as.mcmc(), the first sample always has very high deviance, and is typically very…
I'm trying to figure out how to estimate a changepoint in my data, and to do so I would like to estimate random effects for the period prior to the changepoint and then for the period after the changepoint. However, I do not know when the…
Is there any way to save a jags.model() object into a RData or txt file ?
To perform MCMC on a better computer, I have to save my model on one and using it in a new workspace. But I've some difficulty to use "save()" and "load()" function on…
I am trying to code up a binomial Bayesian model and I get the following error:
Error in checkForRemoteErrors(val) :
3 nodes produced errors; first error: RUNTIME ERROR:
Compilation error on line 15.
Dimension mismatch in subset expression of…