"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

2
votes
2answers
88 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 ...
0
votes
1answer
33 views

Is multinomial the same as multiple binomial?

I wonder, if I write - in JAGS, WinBUGS, or in a paper: x[] ~ dmulti(p[], N) is it the same as if I write: ...
1
vote
1answer
31 views

How can regression trees be fit in WinBUGS/OpenBUGS/JAGS?

There is an R package called BayesTree which can fit regression trees in Bayesian environment. However, this way only simple regression is possible. I would like to use regression trees as a part of a ...
0
votes
0answers
31 views

Combining Posterior Distributions of Separate Models

I am running Bayesian models to estimate the number of fruits on a plant, given the presence/absence of herbivores. I get a posterior distribution on each mean. I then run a separate model to estimate ...
0
votes
1answer
21 views

Jags: How to create vector with probabilities that are based on one of its outcomes?

I am very new to Jags. I just started using it for my stats class. I have done other types of programming, but I am having trouble understanding how to use Jags properly. Right now, I have a vector ...
3
votes
2answers
67 views

R - how to get standard error for a breakpoint/parameter in a piecewise regression

I'm new to asking questions here, so I hope this is a reasonable place for this. I am trying to fit a piece-wise regression. I expect my response (y) to increase from x0 to somewhere along x, then to ...
1
vote
1answer
57 views

JAGS Multinomial mixture model with missing data

I am trying to fit a multinomial mixture model to data from a stream depletion survey. The data were collected by selecting a stream site that is a standard length (usually 150-200m depending on ...
0
votes
0answers
46 views

Constrained Random Walk Prior BUGS/JAGS

I'm currently trying to implement a model along the lines of Owen (2009) and Knorr-Held (2000) in JAGS. In particular, I am struggling to model the constrained random walk priors. We have that ...
1
vote
0answers
41 views

Point Estimate of normally distributed threshold parameter with unknown mean and variance

I'm new to Bayesian analysis an applied what I learned in John Kruschke's book to simplified versions of a model I previously fitted with non-Bayesian methods. For those simplified versions, even ...
2
votes
0answers
68 views

Estimating parameters and latent variables in a split Poisson distribution using R and JAGS

I am trying to estimate parameters and latent variables in a split Poisson model that describes observable and unobservable counts in time assuming the split probability is $\pi$. An observable event ...
1
vote
0answers
68 views

JAGS prior-based prediction

I'm trying to use rjags to predict what the curve-maximums will be for different groups of incomplete data (one metric x and one metric y). Here is an example of the indata: ...
7
votes
1answer
164 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
127 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
69 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
170 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: ...
3
votes
2answers
137 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
44 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
92 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
59 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
279 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
84 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
38 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
99 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
37 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
207 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
225 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
34 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
102 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
56 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 ...
2
votes
1answer
120 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
155 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
107 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
76 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 ...
5
votes
0answers
290 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), ...
3
votes
1answer
403 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
92 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
122 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
142 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 ...
7
votes
1answer
364 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 ...
3
votes
0answers
308 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: ...
3
votes
1answer
853 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
1answer
190 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
387 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 ...
7
votes
1answer
394 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 ...
8
votes
2answers
293 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 ...
5
votes
1answer
202 views

Weighted generalized regression in BUGS, JAGS

In R we can "prior weight" a glm regression via the weights parameter. For example: ...
3
votes
1answer
86 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
39 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
125 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 ...