"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

0
votes
0answers
9 views

Estimation of a Probit model via data augmentation using JAGS [migrated]

I'm trying to estimate a Probit model with data augmentation. This works without data augmentation, but the end goal is to estimate a multinomial Probit model, where data augmentation is helpful. ...
0
votes
1answer
30 views

JAGS Error when fitting Gamma GLM: Invalid parent values

I am trying to fit a Gamma GLM to my data.Here's my code: ...
2
votes
0answers
37 views

Hierarchical Bayesian model with heterogenous errors

I have an experiment where I repeatedly show subjects two lights, and I ask which light is brighter. I am interested in whether error rates decrease over time, holding all else constant. I also ...
0
votes
0answers
27 views

WinBUGS/JAGS code for calculating Bayesian p-value from negative binomial model

I have a working negative binomial model written in BUGS code, but am not sure about the appropriate Bayesian p-value code to test goodness of fit. Specifically, I would like to calculate Pearson's ...
0
votes
0answers
15 views

JAGS dmstate markov specification

Does any one have experience in running multi state models in jags? I am trying to run a msm on my dataframe with activity being 1/0 time from diag being times observation of the activity and patient ...
1
vote
0answers
20 views

What are good values for autocorrelation, Gelman, and cross-correlation in rjags?

I don't want to post my whole code since it is long, so I will only post part of it: ...
1
vote
1answer
33 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. ...
0
votes
1answer
49 views

JAGS Error: Invalid Parent Values on last observation

I am using R2jags to fit a model in R using JAGS. Here is my code: ...
2
votes
1answer
119 views

Bayesian meta analysis: implementation in BUGS/JAGS/STAN

I would like to conduct a meta analysis in order to collate the information from a number of studies. The parameter of interest is a probability $\theta$. In each of the studies, the observed data ...
1
vote
1answer
42 views

Jags - estimates are same as true values of y?

Lets say I have the following state space model: $y_t = \beta_t x_t + \epsilon_t$ $\beta_{t+1} = \mu_t + \beta_t \eta_t$ $\mu_{t+1} = \mu_t + \omega_t$ All my true values for $y$ are known, but I ...
0
votes
1answer
29 views

Can Jags be used to fit classical inference state space models?

Can Jags be used to fit classical inference state space models (that is without using a Bayesian approach by specifying a prior)? To be fully clear: can I estimate a state space model such as the ...
2
votes
1answer
52 views

Translating a bayesian model from MCMCpack (hregress) to JAGS

I am trying to convert a hierarchical model that currently works with the R package MCMCpack, into a JAGS version. I have experience working with regular models in JAGS, but not with hierarchical ...
0
votes
0answers
14 views

generating a sequence of indicators based on variable boundaries in JAGS

Suppose I have a vector of indices 1:N, and data y[1], ..., y[N]. I have three variable center points in ...
1
vote
0answers
26 views

code works in jags but not winbugs [closed]

I have band-recovery data from several areas, and am trying to get survival rates for adult and juvenile for each area. Brownie model is used. The model is: ...
1
vote
1answer
94 views

dmulti in jags when sum(p[i]) < 1

I have a problem with dmulti. Principially, this would be my model: ...
2
votes
1answer
127 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: ...
1
vote
1answer
32 views

Interpretation of absurdly large (but probably correct) Bayes Factors?

I estimated a Bayes factor to compare a hypothetical model against a null-model (which obviously by visual comparison of the posterior predictive with the data) fails to capture a certain aspect in ...
1
vote
0answers
52 views

R, JAGS and missing data

I am currently using JAGS via the program R to run N-mixture models using about 5 years of count data. In 3 of these years, there were 3 counts per site, while in the remaining 2 there were 2 counts ...
1
vote
0answers
44 views

“Observed node inconsistent ” when binomial success rate exactly one

I observed some curious behavior in JAGS (rjags). There probably is a good reason for it, but I can't figure it out: As part of a more complex model I have these statements: ...
0
votes
2answers
113 views

Comparing a model with two rate parameters to a model with one. Conjugate priors?

I have a model which includes two exponential rate parameters. I would like to test whether a model with two individual rates describes some data better than a model for which both rates are the same. ...
1
vote
1answer
73 views

Discrete predictors in a mixed effects model in JAGS

I'm fitting a random effects hierarchical model in JAGS and have a question regarding discrete predictors in the contexts of mixed effects models. In my data there is a group variable, which is the ...
2
votes
2answers
158 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
55 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: ...
2
votes
1answer
76 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 ...
1
vote
0answers
51 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
47 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 ...
4
votes
2answers
135 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
166 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
91 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
75 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
90 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
72 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
186 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 ...
1
vote
0answers
242 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
247 views

Dummy coding from a Bayesian point of view

If we want to use categorical variables in regression context, we are allowed to use dummy codings such as these schemes. Is this also required in a Bayesian (MCMC) context, such as with ...
5
votes
2answers
337 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
260 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
90 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
159 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
84 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
539 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
151 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
55 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
348 views

JAGS array indexing [closed]

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
41 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
308 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
520 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
36 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 ...
1
vote
1answer
57 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
175 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 ...