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

0
votes
0answers
9 views

pyJAGS vs RJAGS

I was wondering if there is any empirical studies out there to compare performance of different JAGS bindings, specifically RJAGS and pyJAGS. I am mainly interested in speed. Currently I have an ...
1
vote
1answer
43 views

How to add an interaction term in JAGS?

I'm trying to add an interaction term to a JAGS model. I found this where it shows some interaction terms. But I don't understand what's the guide lines to create an interaction term, which is ...
0
votes
1answer
43 views

“Unable to resolve the following parameters:” jags error for Latent Class Model

I'm looking to fit a Bayesian latent class model in JAGS, but am running into an issue, which I'm seeking help to resolve. The model I'm trying to fit is described below (model details can be found ...
0
votes
0answers
16 views

Logistic regression in JAGS [migrated]

I'm new to Bayesian analysis. I have a hierarchical model with a binary response variable. There is only one predictor (categorical), which has 3 levels: HLL, LHL and LLL. I prepared my data file by ...
0
votes
1answer
20 views

Accounting for interval censoring JAGS model of binary mortality data

I have data on tree mortality, based on two observations of a tree in time. All trees are alive at the beginning of the interval. The length of the re-measurement interval, ...
1
vote
1answer
30 views

coding a JAGS error model for a dependent variable that has increasing variance as a function of the magnitude of the dependent variable

I am running a model in JAGS. I have a situation where y is a linear function of x, but the error in ...
2
votes
2answers
61 views

Calculating prediction variance from JAGS model of a bernoulli outcome in R

I have a model of a bernoulli random process I fit using JAGS via the rjags package in R. Here are some example data, as well as code to fit the given models in ...
3
votes
1answer
92 views

Does JAGS have an R front end like brms for Stan? [closed]

Does JAGS have an R front end like brms / rstanarm for Stan? Is anyone working on one for JAGS?
1
vote
0answers
28 views

Jags Implementation of Multivariate Response Probit Model

I am trying to implement the latent variable interpretation of a probit model with vector response (described on wiki here), but am receiving an error. In this model, we have a matrix $X$, $n \times ...
0
votes
0answers
17 views

transdimensional Markov chain Monte Carlo (MCMC) method, bayesian

I'm studying psychology and i need help with satistics. I have to use the transdimensional Markov chain Monte Carlo method, to compare the mean of three groups with jags on R. 1) mean=91.3, n=30, ...
0
votes
1answer
17 views

generate uncertainty for a prediction using JAGS via rjags in R

Say I have a relationship between two variables, that I have successfully fit using JAGS via the rjags package for R. Below is the code to generate the data, and ...
0
votes
1answer
26 views

How do you model unequal time intervals in an M-array CJS survival model in BUGS/JAGS?

I'm implementing a Bayesian Cormack-Jolly-Seber mark-recapture model in JAGS in the M-array format (based on code from Kery & Schaub's book "Bayesian population analysis using winbugs"). I am ...
0
votes
1answer
47 views

Bayesian errors-in-variables model definition in JAGS and symbolically

I'm fairly new to probability theory and am attempting to understand and implement an errors-in-variables simple linear regression model. I am assuming a model of the form $$ Y=\theta X_a+\epsilon_Y ...
0
votes
0answers
22 views

Multilevel modelling in JAGS: Unable to resolve node

I am building a multilevel model, where the time is on the first level and countries are on the second level, in JAGS (JAGS version 3.4.0). I want to build varying-slope-varying-intercept model, like ...
0
votes
0answers
29 views

Expected value of inverse-Wishart prior in JAGS

I am trying to estimate a covariance matrix in JAGS, using a prior centered around the expected variances. Thus, I want to assign a prior with expected variances that are about equal to the observed ...
3
votes
1answer
48 views

What is causing autocorrelation in MCMC sampler?

When running a Bayesian analysis, one thing to check is the autocorrelation of the MCMC samples. But I don't understand what is causing this autocorrelation. Here, they are saying that High ...
0
votes
0answers
17 views

Estimating unconditional effects in double hurdle models

I trying to implement a double hurdle model in JAGS and am struggling to understand how to estimate the unconditional effects of each predictor variable on the count process. I have implemented the ...
0
votes
1answer
29 views

RJAGS bayesian approach of mixed effects model

Why my posterior result always shows that the sigma and sigma.c estimates to be around 50? It should not be that large as I know from another approach of analysis and also summary of the data. Is it ...
0
votes
0answers
14 views

JAGS missing data problem

For missing data problem in RJAGS, in this site, there are a lot of posts talking about setting priors to generate data for the missing place. However, instead of filling up the places, I tend to ...
0
votes
1answer
42 views

Hierarchical Bayesian model - issues with JAGS/BUGS switching between lognormal and normal

I'm trying to construct a hierarchical model using JAGS, but I'm running into issues converting between normal/lognormal distributions and the more I stare at my problem, the more confused I get. ...
0
votes
0answers
10 views

Discrepancy measure for bayesian beta model

I fitted a beta model with a vector of Jaccard similarities as response variable and a vector of euclidean distances as predictor variable in JAGS. I coded the model as follows: ...
0
votes
0answers
18 views

Why do I have to define the top-level parameter in JAGS, and how?

According to the user manual of r-jags (section Compilation): Any node that is used on the right hand side of a relation, but is not defined on the left hand side of any relation, is assumed to ...
1
vote
0answers
58 views

How to specify the Bayesian version of a clustered-robust standard error OLS in BUGS/JAGS or Stan?

I am trying to reproduce a simple OLS model fitted with clustered-robust standard errors within the Bayesian framework (be it with BUGS/JaGS or with Stan). In R, my frequentist model is the following:...
0
votes
0answers
39 views

Changepoint mixed model R2jags

Can anyone suggest a way to code a changepoint model in JAGS (I'm using JAGS within R using R2jags) for the variance parameter of a random intercept effect? I am using the data set sleepstudy from ...
1
vote
1answer
100 views

What is the distribution of the ratio of two normals?

I need to use the ratio of two variables as the dependent variable in a regression. Both variables are normally distributed but with positive values. I can either center them or use as it is. If I ...
1
vote
1answer
49 views

reduce size of an MCMC/ rjags object

I have recently started running more complicated Bayesian models in R using the rjags package. As model complexity has increased I have had to run longer chains to reach convergence for some ...
3
votes
0answers
59 views

Why is this Bayesian estimate of a truncation-point so poor?

I have several datasets. Each dataset holds the masses of objects that have been subject to physical wear, expressed as a proportion of their original mass ($w$), and the amount of time that the ...
0
votes
0answers
52 views

Using the 'product space method' to test the evidence for hypotheses of random effects in hierarchial Bayesian models

I am exploring the use of product space methods, coded in JAGS within R, for Bayesian model selection/comparison. I am particularly interested in using this method to test hypotheses about random ...
0
votes
0answers
31 views

Using posterior predictions samples for Bayes factor input

I have two posterior prediction distributions produced using JAGS that I would like to compare using Bayes Factor as an alternative to a t-test. For each posterior, I have run 4 chains, and converted ...
0
votes
1answer
95 views

Sum of multiple probability distributions [duplicate]

Background: I try to estimate the potential energy supply within a geographical area using spatially explicit data. For this purpose I use a Bayesian network and several spatial data layers as ...
0
votes
0answers
68 views

JAGS: Cannot invert matrix: not positive definite

I am trying to model a response Y (count; range: 0-230) against a single predictor X (continuous, rescaled and centered to lie between -0.18, 44.8). The parameters of the relationship between X and Y ...
1
vote
0answers
122 views

Ones trick in BUGS gives node inconsistent with parents error [closed]

Edit: This issue doesn't come up if I use OpenBUGS. But I can't use it for my bigger problem as it seems "very slow" compared to JAGS at least on my machine. I am using JAGS as my BUGS flavor to run ...
0
votes
0answers
60 views

When you have a multilevel / mixed effects model, how do you incorporate the random intercepts when making a prediction?

When you have a multilevel / mixed effects model, how do you incorporate the random intercepts when making a prediction? Here is the context: I'm trying to model a Bayesian regression using an index ...
0
votes
0answers
23 views

regression for left censored data with JAGS

I don't have much knowledge about how to use JAGS to do bayesian regression, I have seen several examples but my data is left censored and I am not sure how to construct the likelihood function, if ...
0
votes
2answers
86 views

Invalid parent values in JAGS

I read through some other forums with the same error but have not yet been able to figure out my case. When I run the model: ...
2
votes
1answer
177 views

Multi-level Bayesian hierarchical regression using rjags

I am trying to to implement a Bayesian hierarchical Model in R. I have a few predictor variables (2 metric and one categorical) and am trying to predict quarterly home sales in the US. Each sales ...
0
votes
0answers
52 views

Calculate AIC or Anova from an RJags model

I am fitting multivariate linear regressions with RJags (I have to do it with an mcmc because I'm taking all errors into account). I want to know between two polynomials which one fits better my data....
0
votes
1answer
127 views

error when running JAGS

In an attempt to learn JAGS I am trying to fit a line to data points. The data points have errors in both directions i.e. along the xaxis and yaxis. Here is my model: ...
1
vote
1answer
123 views

My MCMC do not overlap : Mixturemodel with JAGS and R

I fitted a JAGS model and I have those results : My questions are: Why do my chains not overlap, and how can I fix that? I used the following method: My model is a mixture Gaussian model of two ...
1
vote
1answer
38 views

How to include Cohen's D from Meta-Analysis into JAGS/BUGS mean difference model

I was wondering if anyone knew of a way to use Cohen's D (and Standard Error) as an informed prior while building a BUGS model (to be tested in JAGS through R) that compares the mean difference ...
0
votes
1answer
41 views

JAGS, RJAGS: simple way to track the moment of a chain instead of the entire chain?

I have a state-space model coded into JAGS. The model predicts the latent state at each observation with ~40,000 observations. In rJAGS I can store the chains of the latent state, '$z$', but having a ...
0
votes
0answers
64 views

How to compare forecast accuracy of ordered probit and the equivalent Bayesian heierarchical model in R?

I have a dataset of a metric predictor variable $X$, and an ordered categorical predicted value $Y$ for several individuals. The dataset are from two groups $G_1$ and $G_2$. I want to estimate $Y$ ...
8
votes
1answer
256 views

How many sides does a die have? Bayesian inference in JAGS

Problem I would like to do some inference on a system analogous to die with an unknown number of sides. The die is rolled several times, after which I would like to infer a probability distribution ...
0
votes
1answer
50 views

Error metric for cross-validation on interval-censored data?

I want to compare crossvalidated model fit (of two Bayesian models, one using a normal distribution and the other a t-distribution) on interval-censored data - data where the exact point is not known, ...
2
votes
0answers
52 views

Deviance n.eff in R becoming 1 at high sample n

I've been doing some basic bayesian t-tests in OpenBUGS, and later JAGS (via a friendly biometrician), and in both cases I ran into a bizarre property of the R-2- packages on the output. Specifically, ...
2
votes
1answer
152 views

Priors for Truncated Parameters - RJAGS

I would like to estimate the parameters of a specific model. The model specification is as follows: $p_t = k_t + B_t/(1-B_t) + \eta_t$, where $ \eta_t \sim N(0, \sigma^2)$ $R_{t+1} = R_{t} + R_t (...
0
votes
0answers
14 views

RJAGS Prediction Envelope for Distributions

I am using RJAGS to estimate the parameters of my model from data. My model contains diverse range of parameters for known distributions. I get the credibility intervals for my distribution parameters ...
0
votes
1answer
134 views

Gamma parameterization and how to randomly generate $\sigma$'s for use in `rnorm(n, $\mu$, $\sigma$)`

Say I have a normal distribution parameterized with a mean ($\mu$) and precision ($\tau = 1/\sigma^2)$. In JAGS, I would specify a prior for $\tau$ as ...
0
votes
1answer
51 views

Effect of “parameters.to.save” in R2jags/ JAGS

I'm using the package R2jags in R, which uses the parameters.to.save argument to specify parameters. I'm interested in the statistical distinction between a ...
0
votes
0answers
17 views

Visual Predictive Checks in RJAGS

I am running a model in RJAGS that is difficult to express in closed form involving numerous data variables. I appear to get satisfactory convergence and have selected my model using the Deviance ...