"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

7
votes
1answer
134 views

Combining data from different sources

I want to combine data from different sources. Let's say I want to estimate a chemical property (e.g. a partitioning coefficient): I have some empirical data, varying due to measurement error around ...
0
votes
0answers
33 views

Specifying a Normal-Log-Normal Mixture (Skew Normal) in WINBUGS/JAGS

I am an actuary working on a Bayesian loss reserve model using incremental average severity data. Exploratory analysis of the response seems to suggest a skew normal distribution of some sort would be ...
2
votes
0answers
39 views

Dummy coding from a bayesian stand of view

If we want to use categorical variables in regression context we are allowed to use dummy codings such as: http://www.ats.ucla.edu/stat/r/library/contrast_coding.htm Is this also required in ...
5
votes
2answers
71 views

Fitting a simple JAGS model with RSTAN

I'm trying to fit a simple exponential model for left censored data using RSTAN to replicate something I did in JAGS. The JAGS model is: ...
2
votes
1answer
67 views

Setting a proper prior distribution on sigma for Bayesian Regression

I'd like to know how to set a proper prior distribution on sigma when using JAGS in a Bayesian regression. Here is what I have: ...
1
vote
0answers
27 views

JAGS error re length mismatch in Node

I am trying to specify a logistic regression model in JAGS. I am encountering an error I haven't seen before, and haven't found a solution online. I would appreciate if anyone knew what was happening. ...
2
votes
0answers
51 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 ...
1
vote
0answers
41 views

BUGS/JAGS for Nominal Response Model

I am a beginner with BUGS/JAGS and I was hoping to gather the opinion of you, experts. I am trying to implement a Nominal Item Response Analysis (Polytomous, not ordered, like a multiple-choice exam) ...
2
votes
0answers
107 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 ...
1
vote
2answers
57 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 ...
1
vote
0answers
26 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
1answer
36 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 ...
1
vote
1answer
31 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
100 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
96 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
29 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
73 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
53 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
87 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
106 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
79 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
42 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
66 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 ...
2
votes
0answers
183 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), ...
1
vote
1answer
238 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
74 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
108 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
99 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
206 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 ...
7
votes
1answer
299 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
58 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
214 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
555 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
109 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 ...
3
votes
1answer
269 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
65 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
332 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 ...
7
votes
1answer
210 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
152 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
74 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
37 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
105 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
257 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 ...
1
vote
1answer
206 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
288 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
85 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
269 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
124 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 ...
4
votes
1answer
164 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 ...