BUGS is an acronym for Bayesian inference Using Gibbs Sampling; BUGS is also a software package for doing this.

learn more… | top users | synonyms

0
votes
1answer
37 views

Bayesian estimation of Dynamic Linear Models with RStan

I'm reading the Dynamic Linear Models with R book, where most of chapter 4 is devoted to bayesian estimation of parameters. They code most of it manually though, and it seems it can get quite tricky ...
0
votes
1answer
25 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
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
1answer
61 views

Marginal prior $p(\mu)$ of mean of a normal distribution when both mean and variance are unknown

I read that if the data is normally distributed with mean $\mu$ and variance $\sigma^2$ (both unknown) then to have the joint posterior distribution $p(\mu, \sigma^2 | y)$ in closed form, one has 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
28 views

Implication of using independent priors for means of joint normally distributed random variables

I am using Bayesian methodology to estimate parameters of joint distribution(Multivariate normal) of random variables $(y_1, y_2) \sim N(\mu, \Sigma)$. I implemented the code for finding the posterior ...
1
vote
0answers
27 views

Change a random effects model into a fixed effects model in *BUGS

I want to manipulate this RE model into a FE model for sensitivity analysis. The model is described here: Baseline natural history model ...
0
votes
0answers
36 views

Mixture model: 3 binomial components (using WinBugs)

I've a BUGS question I've been unsuccessfully trying to define the likelihood for a mixture of 3 binomial distributions. I'd like to estimate the mixing proportions for a given dataset. Once this is ...
1
vote
0answers
121 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
13 views

OpenBUGS intuition with data [duplicate]

I've recently discovered Bayesian statistics, currently I am experimenting with Openbugs, yet I cant grasp the concept of what happens with the inputted data. I understand mcmc, yet all of examples I'...
2
votes
0answers
117 views

Testing Key Assumptions of Cultural Psychology with Bayesian Analysis [closed]

I have been trying to come up with a way to represent some of the key assumptions of culture in actual measurement and statistical modeling practices. For all of these points, it seems like the ...
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
0answers
44 views

How to calculate False Positive rate?

How to calculate False Positive rate in a scenario where I have 334 bugs in total out of which 57 are Not an Issue type? I believe 57 are false positives in this scenario
0
votes
1answer
133 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
50 views

Observed function of hidden random variables

Let's say a worker can perform 4 types of tasks in a day: A,B,C,D. Each of which tasks takes time that is distributed according to some probability distribution, say $$ T_A \sim Gamma(\alpha_A, \...
4
votes
0answers
99 views

AR(1) model - which prior to use?

I want to use the following univariate model: $y_t = \mu_t + \epsilon_t, \ \epsilon_t \sim N(0,1)$ $\mu_t = \phi \mu_{t-1} + \omega_t, \ \omega_t \sim N(0,\sigma_\omega^2)$ That is, $\mu_t$ follows ...
1
vote
0answers
94 views

Discrete MCMC JAGS chains get stuck

I have been running a model where one of the parameters is discrete. I can't think of a simple way to represent this model, so I won't (unless necessary) post it here. My issue is, that when I look ...
1
vote
2answers
80 views

JAGS choosing a random subset of a vector

I would like to allow the subset of a vector I am summing over to be a random quantity. My model is of the form (albeit more complex): ...
2
votes
1answer
387 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 $...
2
votes
1answer
226 views

Crossvalidation in hierarchical bayesian models (HBMs)

I am trying to find a way to cross-validate Hierarchical Bayesian Models used for predicting and modelling abundance in Species Distribution Models. For this purpose, I have tried posterior predictive ...
1
vote
2answers
138 views

Suspiciously high Multivariate PSRF from gelman.diag()

I am using "Multivariate PSRF" statistics from gelman.diag() function to analyze my MCMC chains. Now I analyzed convergence 471 variables (parameters for each site)....
1
vote
0answers
29 views

OpenBUGS and coda library

I've fitted a hierarchical model with OpenBUGS using R2WinBUGS package of R. Now, I'd like to use the functions contained in the ...
0
votes
2answers
351 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. ...
2
votes
1answer
356 views

What is the difference between R hat and psrf?

In convergence diagnosis in WinBUGS/JAGS/Stan, there are different statistics reported for each variable. In WinBUGS/Stan, Rhat ($\hat{R}$) is reported. In JAGS with the ...
1
vote
1answer
151 views

How to define function in OpenBUGS

In my Hierarchical Bayesian Model, in the data layer y[i] <- M(t,u,v)+ N[0,sigma_y] where M is a complicated function. I have generated the output of this M by ...
6
votes
0answers
360 views

Is my OpenBUGS / WinBUGS model well specified?

I've just started trying to use OpenBUGS for Bayesian analysis of stochastic volatility models. In particular, I'm trying to calculate stochastic covariance, similar to the DC-MSV model specified by ...
1
vote
0answers
777 views

What is the form of link function in this BUGS multinomial regression example?

The alligators example from openbugs examples repository is the same example that comes with winbugs. Basically this is a multinomial logistic regression example in which the outcome variable has 5 ...
1
vote
0answers
101 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
114 views

Dawid Skene model for BUGS

I'm a beginner in BUGS. I'm trying to code the Dawid Skene model in BUGS. The model is as follows: Currently, I'm adapting the code from Stan, here. Here is the code: ...
2
votes
1answer
172 views

Concern with using the DIC to compare Bayesian models

The deviance information criterion (DIC) is a very popular tool for Bayesian model selection, due, in part, to its support by the BUGS platforms. However, there are some remaining limitations as ...
1
vote
0answers
155 views

Multigroup Longitudinal Item Response WinBUGS OpenBUGS

I was able to fit the Longitudinal IRT model in Winbugs for an ordinal response by extending the BUGS code I took from the paper by Curtis in JSS http://www.jstatsoft.org/v36/c01/paper/ However, I am ...
2
votes
1answer
555 views

How to Implement an Empirical Bayes Analysis in BUGS/JAGS/Stan

My data is a set of $N$ observations $y_i$. I would like to estimate $\mu$ and $\sigma$ in the following model: $y_i \sim \mathrm{Normal}(\theta, \sigma)$ $\theta \sim \mathrm{Normal}(\mu, \frac{\...
0
votes
1answer
53 views

Linear Regression with Outlier accounting in Bugs

I'm trying to redo an exercise in BUGS from this webpage: a linear regression over a data set with some outliers, using a model that accounts for them. This model uses a mixture of signal and noise (...
1
vote
0answers
132 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) ...
1
vote
0answers
95 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. ...
2
votes
0answers
41 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 ...
2
votes
0answers
2k views

WinBUGS/OpenBUGS Gamma distribution parameters [closed]

According to the WinBUGS manual the gamma distribution is defined by: dgamma(r,mu) However, what is r? Is it the shape, scale ...
1
vote
1answer
189 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
46 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
105 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
675 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), ...
0
votes
0answers
375 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 ...
9
votes
2answers
627 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 ...
8
votes
2answers
861 views

Weighted generalized regression in BUGS, JAGS

In R we can "prior weight" a glm regression via the weights parameter. For example: ...
2
votes
1answer
1k views

WinBUGS: Multiple definitions of a node

So this question is about the BUGS modeling language. So you either know it or have no clue. I'm a newbie to this so it's been driving me mad. I want to define a simple two-state hidden Markov model (...
1
vote
0answers
206 views

Weighting data sources in a bayesian model (BUGS)

I use a state space model to fit observations to a population dynamic model (using the BUGS language). In the "state" part, the dynamic model create a new "state" of the population (i.e. size and ...
4
votes
1answer
140 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 "...
2
votes
0answers
239 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 \begin{...
6
votes
2answers
460 views

Should coin flips be modeled as Bernoulli or binomial draws in RJags?

What is the best way to model coin flips as a hierarchical model? Do you say coin draws are a series of draws from Bernoulli trials or as one draw from a binomial distribution? That is something like ...
3
votes
1answer
5k views

Definition of dispersion parameter for quasipoisson family

I try to model quasi-poisson family in bugs language, to handle overdispersion. According to Introduction to WinBUGS for ecologists, this is done by: $log(\lambda_i) = f(x_i) + \epsilon_i$ $N_i \sim ...