# Tagged Questions

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

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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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'...
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 ...
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 ...
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
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 ...
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, \...
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 ...
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 ...
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): ...
387 views

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 (...
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) ...
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. ...
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 ...
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 ...
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!! ...
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 ...
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 ...
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), ...
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 ...
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 ...
861 views

### Weighted generalized regression in BUGS, JAGS

In R we can "prior weight" a glm regression via the weights parameter. For example: ...
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 (...
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 ...
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 "...
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{...
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 ...