We’re rewarding the question askers & reputations are being recalculated! Read more.

# Questions tagged [jags]

"JAGS is Just Another Gibbs Sampler. It is a program for analysis of Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation not wholly unlike BUGS." (http://mcmc-jags.sourceforge.net/)

34 questions
Filter by
Sorted by
Tagged with
5k views

### Prediction based on bayesian model

I have created a bayesian model that estimates 6 parameters using rjags from R. Now i want to do some predictions based on new data in R. Can anyone help me with an example. ...
1k views

### When making inferences about group means, are credible Intervals sensitive to within-subject variance while confidence intervals are not?

This is a spin off of this question: How to compare two groups with multiple measurements for each individual with R? In the answers there (if I understood correctly) I learned that within-subject ...
962 views

5k views

### Specify a Zero-inflated (Hurdle) Gamma Model in JAGS/BUGS

I'm trying to use a zero-inflated gamma model (or a gamma 'hurdle' model). The model is a mixture of logistic regression and generalized linear modeling. I can do this analysis in two steps: 1) do a ...
5k views

### Ordered logit in JAGS

I am trying to code a simple model with JAGS: ...
696 views

### What level to use when comparing subjects in a hierarchical Bayesian analysis?

Say that I have an experiment where I test the reaction time of a number of subjects where each subject makes many reaction time trials. In a Bayesian framework the reaction times ($y$) could be ...
2k views

### Hyper-prior for negative binomial in hierarchical model using JAGS/BUGS

Below I'm using a negative binomial because it is more flexible than a simple poisson model. The data are counts $y$ of events for 16 individuals $x$. There are 14 counts (i.e. counting periods) for ...
2k views

### Bayesian mixed model regression with a between subjects factor

I'm trying to specify a model in JAGS/rjags with one between subjects factor (a, with two levels - Y, N) interacting with one repeated measures continuous variable x plus subject varying slopes and ...
4k views

### How do I parameterize a Weibull distribution in JAGS / BUGS?

Based on the answer to a previous question, For which distributions are the parameterizations in BUGS and R different? I have been transforming R parameterizations to JAGS parameterizations, but I ...
5k views

### How to generate predictions with rjags?

I've used rjags to run MCMC on a model, specified in the JAGS language. Is there a good way to extract that model and perform predictions with it (using the posterior distributions of my parameters)? ...
926 views

### JAGS, cannot evaluate upper index of counter

I asked this question at the JAGS sourceforge help forum but didn't get response there. I have the following JAGS model: ...
1k views

### Binomial coefficient in JAGS

I'm trying to write such likelihood using JAGS in R (in order to estimate parameters $\xi$ and $\pi$, being $m$ fixed equal 7) using the "ones trick" and got stuck ...
311 views

### Difficulties with a Bayesian formulation of a model for human timing data

The Wing-Kristofferson model is a simple model of the behavior of a human trying to drum out a steady beat (that is, trying to mimic a metronome). Let $y_i$ be the $i$th interval between two drum ...
2k views

### Using JAGS for bayesian parameter estimation

I am using JAGS in R to construct a probabilistic graph model and estimate the corresponding parameters. The models is described as follows: ...
751 views

### Bounds on correlation to ensure covariance matrix is positive definite

UPDATED: I am constructing a correlation matrix for an MA(1) process, which would look something like...  C = \left( \begin{array}{cccccccccccccccccc} 1 & \rho & 0 & 0 & 0 & 0 &...
669 views

### Appropriate GLM when response variable is proportion, but not binomial

The response variable I'm dealing with is the proportion of a total area that is suitable habitat for a species of interest. So although the response variable is bounded between 0 and 1, my intuition ...
684 views

### error in JAGS beta-regression model R - value out of range in 'gammafn'

I am running a simple beta regression model in JAGS, following the example given here. Here is my JAGS model code as an R object: ...
346 views

### JAGS burn-in phase takes ZERO time? [duplicate]

My breath was taken away by this. I tried to run my JAGS model with different number burn-in samples but it still takes the same amout of time!! ...
443 views

### Random effect on scale parameter

I am trying to use random effects on both the location and scale parameters in a lognormal regression. As you can see in the JAGS code below, I am essentially fitting a accelerated failure time model ...