BUGS is an acronym for Bayesian inference Using Gibbs Sampling; BUGS is also a software package for doing this.
Questions tagged [bugs]
121 questions
44
votes
4 answers
OpenBugs vs. JAGS
I am about to try out a BUGS style environment for estimating Bayesian models. Are there any important advantages to consider in choosing between OpenBugs or JAGS? Is one likely to replace the other in the foreseeable future?
I will be using the…

DanB
- 898
- 8
- 13
31
votes
1 answer
For which distributions are the parameterizations in BUGS and R different?
I have found some distributions for which BUGS and R have different parameterizations: Normal, log-Normal, and Weibull.
For each of these, I gather that the second parameter used by R needs to be inverse transformed (1/parameter) before being used…

David LeBauer
- 7,060
- 6
- 44
- 89
16
votes
1 answer
How to analyze longitudinal count data: accounting for temporal autocorrelation in GLMM?
Hello statistical gurus and R programming wizards,
I am interested in modeling animal captures as a function of environmental conditions and day of the year. As part of another study, I have counts of captures on ~160 days over three years. On each…

djhocking
- 1,701
- 3
- 17
- 21
14
votes
2 answers
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 distribution. I also have several predictors.…

Joël
- 163
- 2
- 8
14
votes
2 answers
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 call them from R. But R also has several of its own…

BYS2
- 1,365
- 2
- 12
- 19
13
votes
5 answers
R only alternatives to BUGS
I am following a course on Bayesian statistics using BUGS and R. Now, I already know BUGS, it's great but I am not really fond of using a separate program rather than just R.
I have read that there are a lot of new Bayesian packages in R. Is there a…

Sacha Epskamp
- 287
- 1
- 13
12
votes
2 answers
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 any arbitrary model specification?

user4733
- 2,494
- 2
- 20
- 31
12
votes
3 answers
Weighted generalized regression in BUGS, JAGS
In R we can "prior weight" a glm regression via the weights parameter. For example:
glm.D93 <- glm(counts ~ outcome + treatment, family = poisson(), weights=w)
How can this be accomplished in a JAGS or BUGS model?
I found some paper discussing…

user28937
- 141
- 1
- 5
11
votes
4 answers
Vector multiplication in BUGS and JAGS
In R, c(3,1,0) * c(2,0,1) == c(6,0,0). This is not dot product and it's not cross product. First, what is the name for this product, and second, does it work in WinBUGS, OpenBUGS and/or JAGS?

Jack Tanner
- 4,552
- 3
- 27
- 39
10
votes
3 answers
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 presence/absence of a certain species, and the variable is…

Gago-Silva
- 653
- 7
- 19
10
votes
1 answer
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 beta4 (stats, density), but I don't know how to get the prediction of the last value of h, which I set to NA to model…

Bo Yu
- 141
- 2
- 6
10
votes
1 answer
Missing values in response variable in JAGS
Gelman & Hill (2006) say:
In Bugs, missing outcomes in a regression can be handled easily by
simply including the data vector, NA’s and all. Bugs explicitly
models the outcome variable, and so it is trivial to use this model
to, in effect,…

Jack Tanner
- 4,552
- 3
- 27
- 39
9
votes
2 answers
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 R2jags:jags.
However, I am using the rjags package. When I try to plot the results of the function rjags::coda.samples…

David LeBauer
- 7,060
- 6
- 44
- 89
9
votes
1 answer
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 runjags package, psrf (Potential Scale Reduction Factor) is reported (it is…

Tomas
- 5,735
- 11
- 52
- 93
8
votes
1 answer
Specify a Zero-inflated (Hurdle) Gamma Model in JAGS/BUGS
I'm trying to use a zero-inflated gamma model (or a gamma 'hurdle' model). The model is a mixture of logistic regression and generalized linear modeling. I can do this analysis in two steps: 1) do a logistic regression against presence/absence data…

Nate
- 768
- 5
- 10