"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/)

learn more… | top users | synonyms

1
vote
2answers
26 views

JAGS meta-analysis

I'm using JAGS to run a meta-analysis and I've run into an issue. I have calculated log-response ratios and errors for about 177 studies, where studies fall into one of 8 groups. I'm interested in ...
0
votes
0answers
13 views

number of stochastic nodes in bayesian multivariate distribution?

I'm doing some bayesian modeling using BUGS - JAGS to be specific. I find it hard to infer how many stochastic (i.e. non-deterministic) nodes there really are when I use multivariate distributions. ...
0
votes
0answers
11 views

JAGS array indexing

I have a relatively simple multivariate response problem that seems to causing me problems with array indexing. I've scraped/rewworked the model program down to the bare essentials and hopefully ...
0
votes
1answer
16 views

Inferring testlet structure in item response theory

Is it possible to infer the testlet structure in a set of items using item response theory? Specifically, I've created a lot of variations on the story recall task, each variation being scored on 25 ...
2
votes
0answers
52 views

Within-subjects model in JAGS/stan

I have a general question regarding a varying intercept / varying slope model in jags/stan: I have data from a psychophysics experiment, with one covariate, one within-subjects factor and several ...
2
votes
0answers
46 views

Help with JAGS model using matrix multiplication and Dirichlet prior

I want to set up a simple JAGS model using matrix multiplication, but I am not sure how to set up the matrices. My overall equation is $c=yx$ where $c$ is a 2x1 matrix defined in R of observed data ...
2
votes
0answers
23 views

BUGS with very large sample size

I posted this question on the JAGS help discussion, I was seeing if I could get any help here: I wish to fit a survival model using the data below (first two columns are time points, NA represents ...
0
votes
0answers
37 views

Ordered logistic regression in JAGS

I am estimating a simple ordered logistic regression -- in fact, I am expanding this to a multilevel model, but I cannot get the simple ordinal model to converge. The data are three wave panel data, ...
1
vote
1answer
50 views

Is this multivariate normal? 2 time series linked by a common process

Summary: Consider a scenario where you observe the inputs ($X$) to and outputs ($Y$) from a process ($B$). If I have a model describing how $X$ evolves over time, and a similar model for $Y$, how do I ...
1
vote
1answer
70 views

Only allow positive MCMC-samples: Implications for credible interval

We calculate a Bayesian model and only expect positive values for our parameters. Our prior is however a uniform prior—we get negative samples from MCMC. For Bayes-factor calculations we use the ...
3
votes
2answers
80 views

How to conditionally run element of JAGS script based on user supplied variable?

Background: I often find that when working with JAGS that I end up with a lot of JAGS scripts as I explore different models. After a while I might settle on a set of models that I'm going to report, ...
1
vote
1answer
61 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!! ...
0
votes
0answers
41 views

Regarding three R packages for Bayesian analysis [duplicate]

There are several R packages for Bayesian analysis, i.e., RBugs, JAGS,MCMCPack. Are there ...
1
vote
0answers
53 views

Is this JAGS model ok, and can it be made faster?

I'm very new to Bayesian analysis, and I've come up with the following model. My goal is to get for each individual "test unit" a distribution that describes the lift in success rate under one of ...
1
vote
0answers
111 views

CAR spatial models in JAGS

WinBUGS comes with the GeoBUGS add-on, which contains a number of predefined model structures that are suitable for modelling spatial data structures e.g. geostatical structures (spatial.exp), ...
0
votes
1answer
132 views

Define Priors for Dirichlet Distribution parameters in JAGS

I'm defining a Multinomial-Dirichlet model in JAGS and want to assign some hyperpriors to the parameters of the Dirichlet distribution. In the WinBugs manual I read that "the parameters of Dirichlet ...
2
votes
1answer
60 views

Autoregressive prior distributions

I have a set of 50 (P) time series' and each one is on a slightly different but should be influenced by the same effects of time. To get the time effects I have ...
3
votes
1answer
98 views

Use the improper prior $p(v) \propto 1/v$ into Jags

I know that one can approximate this density ($p(v) \propto 1/v$) using its truncated version and implement it this way: ...
0
votes
0answers
78 views

Naive SE vs Time Series SE: which statistics should I report after Bayesian estimation?

I am new to Bayesian estimation. When I do some estimations with JAGS, I find there are statistics called Naive SE and Time Series SE. What exactly do they mean? Is it necessary that I report one or ...
0
votes
0answers
132 views

Invalid parent values, Adaptation incomplete, and print problem in Jags

I am trying to fit a GLMM for binary responses and I want to model the covariance matrix of random effects, say bigE, with some covariates. To do this, we decomposed the bigE into two different ...
6
votes
1answer
241 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 ...
0
votes
0answers
44 views

A question on making prediciton from state space model

I am trying to use JAGS to make prediction from a state space model. I use JAGS to estimate parameters in the model and make prediction. I plot the hist graph for a.new and r.new, the graph for r.new ...
2
votes
0answers
147 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: ...
2
votes
1answer
328 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 ...
2
votes
0answers
87 views

How does JAGS deal with state space models?

I am trying to use JAGS to deal with the following multivariate state space model. $Y_t=X_t\theta_t+\epsilon_t$ $\theta_t=\theta_{t-1}+\nu_t$ JAGS code is neat but JAGS is running too slow when I ...
2
votes
1answer
191 views

Right-censored survival fit with JAGS

Update: I got the JAGS model running and this eliminates the distracting part of my question. It's really about the proper preparation of data for dinterval() and inits. I can't find a concrete ...
0
votes
0answers
57 views

Modeling complex bayes network/MCMC

I would like to try out an idea which is outlined here (http://www.husng.com/content/interpreting-small-sample-sizes-bayesian-estimators), but in a pretty simple model using heuristics. Problem: Lets ...
7
votes
1answer
274 views

Hierarchical Bayesian analysis on difference of proportions

Why Hierarchical? : I've tried researching this problem, and from what I understand, this is a "hierarchical" problem, because you are making observations about observations from a population, rather ...
5
votes
1answer
152 views

How do programs like BUGS/JAGS automatically determine conditional distributions for Gibbs sampling?

Seems like full conditionals are often quite difficult to derive, yet programs like JAGS and BUGS derive them automatically. Can someone explain how they algorithmically generate full conditionals for ...
4
votes
1answer
123 views

Weighted generalized regression in BUGS, JAGS

In R we can "prior weight" a glm regression via the weights parameter. For example: ...
0
votes
0answers
25 views

2-part Regression model with common utility

I am trying to fit the following model to a response variable with many zeros: $$ \begin{array}{lcl} Y_{i} = c \cdot U_{i} \cdot I_{i} + \epsilon_1 \\\ logit(I_{i}) = U_{i} + \epsilon_2 \\\ U_i = a ...
3
votes
1answer
65 views

Fitting proportions in a Bayesian model and controlling the error around the value

I am using a Bayesian state space model constructed in the BUGS language to fit my data. One of the outputs of the "state" part of the model is proportions. I use a beta distribution in the ...
0
votes
0answers
36 views

Introducing observation errors in jags code

I want to introduce observations errors around my data in Jags, but I face some trouble coding it without having a double definition error on node Y3 So far I have : ...
2
votes
0answers
96 views

How to define a BUGS/JAGS or WinBUGS model with a likelihood node that includes two integrals?

I would like to implement a BUGS/WINBUGS or JAGS model that specifies the likelihood node by marginalizing over two parameters. Is this feasible in BUGS/WINBUGS or JAGS? This is the posterior ...
2
votes
0answers
201 views

Label Switching in WinBugs/JAGS

I am using JAGS to estimate a Dirichlet Process Mixture of Normals. The code works well and the estimated density is accurate. However, I would like to know which component each observation is ...
0
votes
0answers
63 views

How to formally describe BUGS model

I want to describe the following (trivial) BUGS model formally. It fits the mean for each subject. ...
1
vote
1answer
173 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 ...
1
vote
0answers
230 views

How to model sum of two values in JAGS?

Imagine, that we measured two values and we know, that in reality one measurement directly corresponds to the latent variable "s1", and the other measurement is in fact sum of two values: "s1" and ...
0
votes
0answers
144 views

How to implement mixture distributions for data in JAGS

In JAGS, how can I model the data being sampled from a mixture distribution? For example, I want an outcome to be either $0$ with probability $p$ or normal with probability $(1 - p)$. $p$ and the ...
0
votes
0answers
62 views

Lognormal and Logit models in JAGS

I'm trying to run this two-part model in JAGS. I have two components, one logit and one lognormal regressions in there: ...
1
vote
1answer
240 views

Simple cloud computing to run R + JAGS simulations

I want to simulate the frequentist properties of a Bayesian model. So, for example, I might want to fit a Bayesian model 1,000 times to 50 different configurations each of which takes about 10 seconds ...
3
votes
0answers
98 views

A better bayesian way of modelling autoregressive mixtures

I have a JAGS hierarchical model which includes a temporal sub-model for the primary vote share between four party groups (LNP, Labor, Green, and Other). For each day in the temporal model, the vote ...
0
votes
0answers
76 views

What is the difference between these very simple normal and hierarchical normal BUGS models?

Consider these basic JAGS models, each having the same input. The question concerns only the first two, I include the other two for completeness. Model 1 ("normal") ...
4
votes
1answer
149 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 ...
0
votes
1answer
128 views

Error in JAGS code [closed]

I'm trying to run the following code in JAGS ...
-1
votes
1answer
149 views

CODA gleman.diag, Error in chol.default(W): [closed]

I'd like to use gelman.diag for an MCMC chain I ran in JAGS. It is very large, so I can't provide it. The chain contains several MVN distributions, and I use a wishart prior on the precision matrix. ...
2
votes
1answer
178 views

Multilevel bayesian with AR1 correlation structure

How do I fit a bayesian multilevel model with with AR(1) correlation structure? I am trying to teach myself bayesian modelling and I am wondering how you could specify a multilevel model with an ...
2
votes
0answers
49 views

Coda output, joint quantile

I am running a hierarchical model in JAGS. It is a piecewise constant survival regression model. So I have 4 sets of regression coefficients and baseline hazard rates. I would like to plot a mean ...
11
votes
2answers
444 views

Bayesian variable selection — does it really work?

I thought I might toy with some Bayesian variable selection, following a nice blog post and the linked papers therein. I wrote a program in rjags (where I am quite a rookie) and fetched price data ...
1
vote
2answers
266 views

Thinning chains in BUGS/JAGS

Hi 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 ...