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

learn more… | top users | synonyms

2
votes
1answer
96 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, ...
0
votes
1answer
36 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
41 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
26 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
30 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
139 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
81 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
42 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
66 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 ...
2
votes
0answers
190 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
94 views

How exactly is car.normal model specified?

Looking at the GeoBUGS manual version 12, there is a confusion how exactly the car.normal model is specified: 1) at page 12, I read car.normal and car.l1 [top] ...
0
votes
0answers
99 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 ...
7
votes
1answer
212 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 ...
4
votes
1answer
153 views

Weighted generalized regression in BUGS, JAGS

In R we can "prior weight" a glm regression via the weights parameter. For example: ...
1
vote
1answer
387 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
68 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 ...
3
votes
1answer
74 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
106 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 ...
4
votes
2answers
204 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 ...
2
votes
1answer
1k 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 ...
1
vote
0answers
289 views

How to model sum of two values in JAGS?

Imagine, that we measured two values and we know, that in reality one measurement directly corresponds to the latent variable "s1", and the other measurement is in fact sum of two values: "s1" and ...
1
vote
0answers
85 views

How can I compute covariances between parameters in WinBUGS?

I am wondering if there is an easy way to compute the covariances between parameters in WinBUGS/OpenBUGS. It is easy to obtain the variances, but for subsequent analysis, I need the covariances. ...
0
votes
1answer
102 views

Help with Bayesian inference in OpenBugs

I have a task that involved Bayesian inference and could use some pointers and hints. I've already got some parts figured out but others remain blurred. Also, my OpenBUGS abilities are frankly limited ...
3
votes
0answers
129 views

A better bayesian way of modelling autoregressive mixtures

I have a JAGS hierarchical model which includes a temporal sub-model for the primary vote share between four party groups (LNP, Labor, Green, and Other). For each day in the temporal model, the vote ...
0
votes
1answer
71 views

How to model repeated measures' results in meta-analysis?

I am developing network meta-analysis BUGS model that I will use to compare Hazard Ratios in studies that assume Box Proportional Hazard model. As input I am given pairs: (log HR, its standard ...
-1
votes
1answer
190 views

CODA gleman.diag, Error in chol.default(W): [closed]

I'd like to use gelman.diag for an MCMC chain I ran in JAGS. It is very large, so I can't provide it. The chain contains several MVN distributions, and I use a wishart prior on the precision matrix. ...
1
vote
1answer
82 views

Multiplying a matrix by a scalar which has a prior distribution in OpenBUGS

So I am having a problem specifying my model in OpenBUGS. A set of vectors in a linear regression model is given a multivariate normal prior with a constant mean vector and a constant precision matrix ...
3
votes
0answers
123 views

How to use an initial posterior for recursive / sequential updating in WinBUGS

I am using WinBUGS to estimate / update the parameters of a model. The model is: $$ \begin{aligned} D(T,B,a)&= B*(a_0+a_1T+a_2T^2+a_3T^3)+error(B,T,a) \\ error &= \mathcal N(0, ...
1
vote
2answers
379 views

Thinning chains in BUGS/JAGS

Hi I have a quick question about the details of running a model in JAGS and BUGS. Say I run a model with n.burnin=5000, n.iter=5000 and thin=2. Does this mean that the program will run 5,000 ...
2
votes
2answers
215 views

Results Difference: Frequentist vs. Bayesian

I fit a lognormal model on some data points using both frequentist and Bayesian (using a non-informative prior) approaches. However, I got different results. Here are my codes and outputs: ...
3
votes
1answer
224 views

Calculating the likelihood of time series data when there are missing data

I am trying to calculate the log-likelihood of some time series data given parameter sets estimated in BUGS. I can not figure out how to handle some missing values at random points in time. For the ...
-1
votes
1answer
118 views

Extracting values from R output of bugs command [closed]

I asked this question on http://stackoverflow.com/, but I couldn't get what I want. So, I am asking it here. I am running winbugs from R and I need to use some variables in R output. When I type ...
2
votes
0answers
184 views

Combining posterior distributions

I have 5 different posterior distributions (mcmc samples) which all estimate the same parameter beta. The 5 models are all obtained from 5 independent standardized datasets but estimate the same ...
0
votes
1answer
135 views

How to make inferences on group SD and and the SD of the group SD in a hierarchical Bayesian model?

The hierarchical model specified below is quite "standard" and easy to implement in for example JAGS/BUGS. It has an hierarchical gamma prior on the subject's precisions ($\tau_j$) which in turn has ...
5
votes
1answer
497 views

What's the Bayesian counterpart to Pearson product-moment correlation?

I was wondering what the counterpart to Pearson product-moment correlation would be in a Bayesian framework. Or if there are many alternatives, what would be the most convenient or conventional ...
1
vote
0answers
74 views

Is it possible to compute integrals in JAGS?

Is it possible to specify a model that uses an integral in the JAGS dialect of BUGS? (I believe this is possible in *BUGS, but I use a Mac, on which it seems JAGS is better supported.)
3
votes
2answers
170 views

Non-conventional form for a full conditional

I have a full-conditional of the form : $$ p(X|...) \propto \exp(-(aX^2 +bX +c/X)), $$ All of the other full-conditionals of my model simplify to a simpler form and for a sake of simplicity, I would ...
3
votes
2answers
801 views

How can I model a proportion with BUGS/JAGS/STAN?

I am trying to build a model where the response is a proportion (it is actually the share of votes a party gets in constituencies). Its distribution is not normal, so I decided to model it with a beta ...
1
vote
0answers
69 views

Latent groups in Bayes net with BUGS

I'm modeling a Bayes net with OpenBUGS, and I find problems to specify some of the parameters and their priors. The aim of the model is to identify latent groups in the data from a sample of human ...
2
votes
3answers
204 views

Bayesian meta analysis of residual standard deviation using BUGS

I have a small number of studies where the same model was calculated and want to infer the typical standard residual deviation. I have the degrees of freedom, the sum of the squares SSR and the mean ...
0
votes
0answers
221 views

ANOVA with uncertain values - attempt to redefine node

I'm trying to do one-way ANOVA on uncertain (latent) input value YReal[i] (each input value is not exactly known, but it is given as normal distribution with mean ...
7
votes
3answers
596 views

Winbugs and other MCMC without information for prior distribution

What happens when you don't have an idea of the parameters distribution? What approach should we use? Most of the time we aim to undersatnd if a certain variable has any influence over the ...
4
votes
1answer
155 views

Crazy divergence in mixed model - chains start well but go crazy later

I'm trying to compute a mixed model using jags (R2jags) and I got very strange divergence. The chains started so well, very well according to the results expected (also see ...
3
votes
2answers
461 views

How to model data in jags/bugs generated by taking the minimum of two random variables?

I have been thinking of modeling human timing data using jags where the data comes from an experiment where participants tap in time with a very slow metronome. The data is then a number of ...
2
votes
1answer
681 views

Can I get predictions from Winbugs/OpenBUGS?

I am new to WinBUGS and OpenBUGS. I just fit a model to try an example. I was wondering whether I can get predictions generated by WinBUGS/OpenBUGS. If not, are there any convenient ways available ...
11
votes
2answers
817 views

Optimal software package for bayesian analysis

I was wondering which software statistical package do you guys recommend for performing Bayesian Inference. For example, I know that you can run openBUGS or winBUGS as standalones or you can also ...
0
votes
0answers
272 views

Generating and analyzing predicted data in JAGS

I am trying to model a logistic regression on data predicted from the results of a previous logistic regression, and am having trouble figuring out how to do it, either in OpenBUGS (BRugs) or JAGS ...
7
votes
2answers
678 views

How can I generate a plot similar to that produced by plot.bugs and plot.jags from an mcmc.list?

R seems to be able to output nice summary plots from the bugs and jags objects generated by the functions R2WinBUGS::bugs and ...
5
votes
1answer
1k views

How to get prediction for a specific variable in WinBUGS?

I am a new user of WinBUGS and have one question for your help. After running the following code, I got parameters of beta0 through ...
5
votes
1answer
779 views

Bayesian Analysis in R/WinBUGS and SAS (Proc MCMC)

I have a Bayesian model here in R/WinBUGS. This data "pumps" has two columns, time and fail. Each observation is a pump and fail[1] tells how many failures there were in time[1]. I want to know how I ...