Questions tagged [jags]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
48 views

Help with Power Curve MCMC

I'm trying to analyze some $D$ non-logistic cumulative data in a time series, bounded below by 0 and unbounded above. Splitting data into $W$ time windows of $d$ days, I know each window can be ...
0
votes
0answers
15 views

Why did the inclusion of random effect drastically change the parameter estimates

I working on a project using Poisson model with an offset term. Points to note: The structure of the data is such that; data were collected at state level for each year starting from 2010 to 2015. ...
0
votes
1answer
32 views

One-step ahead predicitons in a Bayesian state-space model

How can I make one-step ahead predictions in a Bayesian state-space model? Specifically, for the model \begin{align} y_t \sim& N(x_t, py) \\ x_t \sim& N(rx_{t-1}, px) \end{align} where $y_t$ ...
0
votes
0answers
14 views

Direct relationship between prior and posterior parameter

I've been trying to learn JAGS and Bayesian modeling more generally and I'm running into something I can't quite explain. I've noticed that when fitting simple mean and variances to normally ...
0
votes
0answers
11 views

Poisson-Gamma vs NB2 regression in JAGS

I am trying to implement a few different count models in JAGS, but with the dependent variable taking large, positive values. While I am also exploring continuous dependent variable variants, I am ...
0
votes
0answers
8 views

Is it possible to perform a Bayesian linear regression with adaptive tuning on the JAGS software?

I am fairly new to Bayesian statistics and this is my first time trying to use JAGS for Bayesian analysis. So my question may or may not make sense, but please bear with me. Is it possible to do ...
0
votes
1answer
46 views

Can I use beta priors in zero inflated poisson model?

Please I have a two fold questions and I am not sure how to phrase the title of my post to capture both. I am trying to fit a regression model in jags, and I am new Bayesian modeling. In my model I ...
0
votes
0answers
7 views

JAGS with dependent observations

I have the following model. At every time unit, the arrivals are Poisson. With a Bernoulli probability, I observe either zero of these arrivals or all of these arrivals. If I don't observe anything, ...
0
votes
0answers
21 views

Is a multinomial distribution appropriate for modelling this variable?

I'm currently trying to model subject performance on a learning task (Wisconsin Card Sorting Task) in Rjags. One of the outcome variables is a 3x1 matching matrix. Each row of the matrix corresponds a ...
0
votes
1answer
38 views

Bayesian Statistics - How to weight a Poisson distributed response

I have a Bayesian GLM where the response that I'm interested in is count data. I want to weight the the response by the variance to account for uncertainty in the measurement. If the response was ...
1
vote
0answers
13 views

Find DIC values for another sample

I trained a model using JAGS and I obtained parameter values. Can I calculate the DIC values for a subset of these data points. The code is ...
0
votes
1answer
24 views

JAGS circular distribution sampling issues

I've been using this dvonmises module/add-on to JAGS, and it's come very much in handy. However, I've run into an issue I was hoping someone might be able to help with. Essentially, samples from the ...
1
vote
0answers
70 views

Precision prior on Bayesian Linear Regression

I'm currently using Jags to fit a Bayesian linear regression to the Swiss dataset in R. The model is that $\text{Fertility}_i \sim \text{N}(\mu_i,\tau)$ with precision $\tau$ and mean: $$\mu_i = \...
0
votes
0answers
11 views

Can a predictor variable from one regression be the outcome variable in a multivariate-like regression?

I was hoping to get advice on what I believe might qualify as a multivariate regression analysis. The first equation is a rather simple linear multiple regression. However, one of the independent ...
0
votes
0answers
25 views

R package for Bayesian generalized non-linear model

I would like to know if it is possible to fit the Lee-Carter model in a Bayesian setting. This model is used to forecast population mortality dynamics and has the following form: $$ log(\mu_{xt})=\...
0
votes
0answers
19 views

Latent Bayesian IRT model with unbalanced panels

I'm using JAGS to estimate an IRT model in which individuals appear multiple times in the dataset but where panels are unbalanced (some individuals appear more often than others. To give you a sense ...
0
votes
0answers
13 views

How do I correctly specify bayesian zero-inflated finite mixture model in jags?

I have basic understanding of Bayesian models and can fit simple models using "rjags". However, I am trying to fit a zero-inflated finite mixture model with n components (say n=2). I expect each ...
0
votes
0answers
25 views

Efficiency of JAGS Bayesian estimates on regression coefficients

I have been reading John Kruschke's book "Doing Bayesian Data Analysis" with specific focus to linear regression. I really like the examples given in the book and tried to create my own scipts and ...
3
votes
2answers
70 views

R alternatives to JAGS/BUGS [closed]

I've recently fit more complex hidden markov models with random effects and covariates etc. JAGS was the only program that could get the job done. Now I want to write my own functions to facilitate ...
0
votes
0answers
14 views

Struggling with implementation of Bayesian model (R JAGS)

For more on the background of the model, see my previous question here that describes the context more clearly. In essence, there is a particular Bayesian model that I am trying to implement. Here ...
0
votes
0answers
17 views

MCMC when intervals are irregular

I have a count model that has irregular intervals. It's a collection of some events throughout a year. The data is confidental so I cannot present the actual data but it has the following structure. ...
0
votes
1answer
88 views

How to correctly include offset in Bayesian Zero-Inflated Poisson model in winbugs

I am trying to fit a Bayesian Zero-inflated model and I want to include an offset term. When I compared the output of the pscl package; the result of the count model from the winbugs and pscl package ...
1
vote
1answer
45 views

Unknown change point mixture model in JAGS [closed]

I'm trying to fit a bivariate unknown change point mixed model data comparable to the one described by Wang & McArdle, 2008 (DOI: 10.1080/10705510701758265). I want to model a linear trend before ...
1
vote
0answers
51 views

How to interpret expectation of one specific observation of $u_i$, eg. $E[u_1|X]$?

I'm a bit hung up on how to interpret the expectation of a single observation of the error term... especially in the context of the zero-conditional mean assumption. If the true population model is ...
0
votes
0answers
39 views

Basics of JAGS metropolis hastings model with negative binomial

I'm having an insane time finding any documentation on JAGS models. As popular as it is, I imagine there has to be something out there. Still, I've searched for over an hour and cannot find even a ...
0
votes
0answers
9 views

How to model 'the transformation of sample variance follows a chisquared distribution' in JAGS?

Suppose $Y_i\sim\mathcal{N}(\mu,\sigma^2),i=1,2,\dots,n$, and we have observed $\bar{Y}$ and sample standard deviation $S$. We know that $$ \bar{Y} \sim \mathcal{N}(\mu,\sigma^2/n) $$ We can use <...
0
votes
0answers
94 views

JAGS code for Poisson or negative binomial hurdle (zero-altered) model with autoregressive residual

I am using Bayesian zero-altered Poisson and negative binomial models analyzing time-series data with JAGS. Because the ACF of the Pearson residuals showed autocorrelation, I decided to apply ...
0
votes
1answer
314 views

“Adaptation incomplete” in rjags. How bad is it?

I'm new to jags and Bayesian inference, but I've run a fairly complex model in jags via rjags. However, I get the warning "adaptation incomplete". As far as I understand it, this means that the ...
0
votes
1answer
46 views

how posterior function is calculated in JAGS

I have a theoretical question. I understand the JAGS samples from the posterior function of a model. But I don't understand (nor I can find in the documentation) how it calculates the posterior in the ...
2
votes
0answers
188 views

Convergence check in MCMC chains in R

I use Gelman-Rubin statistics, trace plots, autocorrelation plots and effective sample size to check the convergence. However, I got very different results from the above tests. The Gelman-Rubin ...
1
vote
0answers
438 views

Calculate a Bayesian 'posterior predictive p-value' for a multinomial logistic regression

For assessing the fit of a model in a Bayesian framework, 'posterior predictive p-values' (PPPs) are often used. Here, a value close to 0.5 indicates a good fit; a value close to 0 or 1 indicates a ...
3
votes
1answer
52 views

Books on Bayesian inferential analysis of GARCH models

Do you know books about Bayesian inferential analysis of GARCH models with the analysis of these models in R and JAGS? Here is a list of the books I already have: [Ardia] - Financial Risk Management ...
1
vote
1answer
72 views

What prior distribution of parameters in the Bayesian estimation of a GARCH model?

In the case of the Bayesian estimation of GARCH(1, 1) model with Student–t or a Skewed distributions for innovations, is it more correct to assume a uniform distribution for the parameters or to ...
1
vote
0answers
292 views

How to implement Exponential Power distribution in JAGS

I would like to fit a simulated data to Exponential Power likelihood using uniform mixture with gamma mixing presented in "Scale Mixtures Distributions In Statistical Modelling" by Choy and Chan: $EP(...
0
votes
1answer
77 views

Predicting survival time from log-hazard

I have estimated a Weibull regression model in BUGS/JAGS which gives me the log-hazard as a function of intercept (baseline hazard) and covariate effects. The intercept is estimated as -9.826 and one ...
2
votes
1answer
250 views

Bayesian p-value in wrong direction using step function in JAGS / BUGS

I have estimated a Weibull regression model in JAGS using rjags and R2JAGS. The estimated posterior predictive p-values using the step() function confuse me. They make sense (comparing them to lower ...
1
vote
0answers
183 views

How to specify a zero-inflated Dirichlet model in JAGS/BUGS

There was a recent publication discussing the advantages of the zero-inflated dirichlet for microbiome count data which is compositional (you are modeling a matrix of species relative abundance data ...
0
votes
1answer
323 views

Trouble specifying a hierarchical dirichlet model in JAGS

I have a sampling design where samples (cores) are taken within plots. Those plots are then nested within sites. There are multiple sites. I would like to get a hierarchical site-level estimate of ...
1
vote
0answers
874 views

How to calculate WAIC from a JAGS model, and fix p_waic issue?

I am running a logistic regression type model in JAGS, and I noticed that I was getting different DIC scores (more than just a few points difference) between runs of the same model. I have a suspicion ...
2
votes
0answers
66 views

Dirichlet regression using jags [closed]

I am trying to fit a simple Dirichlet regression using rjags with a parametrization in terms of the mean and the precision. The model is written as follows: model { # (0) priors for (i in 1:(...
5
votes
1answer
144 views

How to compare AIC values from two Bayesian posteriors

I have a simple question about model comparison: Let's say you fit two models using MCMC: Model A and model B, where model B is model A minus one parameter. You want to assess whether dropping the ...
1
vote
0answers
97 views

Assessing the fit of a state-space model in JAGS

I've been fitting a relatively complicated state-space model in JAGS and I want to do some basic model comparisons, including dropping parameters one at a time to assess their influence on the fit. ...
3
votes
1answer
234 views

Hierarchical Version of Bayesian Change Detection Model in JAGS

I am trying to create a hierarchical changepoint detection model in JAGS, estimating group difference in changepoint based on individual changepoints in scores for an outcome variable (fictional in ...
0
votes
1answer
270 views

Difference of two distributions in JAGS: How to construct likelihood?

I'd like to get the parameters of these "unobserved variables": X1 <- rgamma(100,shape=5, rate=0.5) X2 <- rexp(100,rate=0.1) from this "observed variable" ...
1
vote
0answers
117 views

Bayesian model averaging with pseudopriors

I'm performing Bayesian model averaging (BMA) on 4 models describing the log-death rate. The four model are the Lee-Carter $$\log m_x(t) = \alpha_x + \beta_x\kappa_t+\epsilon_{x,t},$$ the Renshaw-...
1
vote
1answer
68 views

Framework for simulation study to validate bayesian models

I am looking for a framework that would allow to take JAGS/bugs model and on many sets of simulated data test if there is a bias (or not) in the parameter estimates (the real parameters would be known ...
1
vote
1answer
69 views

How to define the Lee-Carter model and its constrains in Bayesian setting

I'm running the Bayesian version of Lee-Carter model on jags, using rjags R package. Given a matrix of data $M$ such that $M_{x,t}=\log m_x(t)$ where $m_x(t)$ is ...
2
votes
1answer
532 views

Convergence issue dirichlet model JAGS, implemented in R

I have data on the relative abundances of 3 species, stored in the matrix r.spp.y. Species 1 has a negative relationship with the variable ...
1
vote
3answers
323 views

Estimating the contribution of covariates in a boral latent variable model

I'm attempting to use latent variable modelling, as described by Hui (2016) and using the boral package in R, to explore relationships between plant species composition and environmental variables ...
0
votes
2answers
60 views

How do I deal with imperfect detection of a covariate in Bayesian Binomial Regression?

First time question, I've had a search around but couldn't find anything, but apologies if this repeats someone else's question. I am running a binomial regression with JAGS, attempting to model the ...

1
2 3 4 5 6