# Tagged Questions

Questions about BUGS language for defining Bayesian models that can be run by the WinBUGS software package. It is advised to supplement your question with a reproducible BUGS example (http://stackoverflow.com/q/5963269).

8 views

### How can I calulate predicted mean of variable x1 from this model

Final Analysis of BDHS model ...
29 views

### Expected value of inverse-Wishart prior in JAGS

I am trying to estimate a covariance matrix in JAGS, using a prior centered around the expected variances. Thus, I want to assign a prior with expected variances that are about equal to the observed ...
34 views

### How to calculate MSPE in winbugs when I use Zero Inflated Poisson regression?

I have had question about Winbugs code. I used ZIP(Zero Inflated Poisson) regression code in winbugs, and I want to compare two models(Poisson Model and ZIP model) using MSPE(Mean Square Predict Error)...
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 ...
176 views

### Which is the best method for network meta-analysis?

There are now several different approaches to perform network meta-analysis. The most commonly used and accessible ones are probably the following: frequentist network meta-analysis with ...
37 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 ...
24 views

### Conditional statements in Winbugs

I am using Winbugs for bayesian estimation. I have a categorical data that consisted of the values:1,2,3. Here is what I have: ...
98 views

### Modeling quadratic function parameters as a function of variables

I'm modeling a response variable that varies seasonally. The pattern is relatively well described by a quadratic function. As the data have been collected over many (~50) years, I'm interested to ...
90 views

### WinBUGS - sample from the posterior of exponential distributed survival times

as introduction to WinBUGS, I want to simulate the posterior of the Gamma-Exp-Model. Because the posterior is known, I can varify the result. But the true posterior is always shifted to the right. I ...
8 views

### Expected count in Winbug

I have mortality count and total population of each counties of three states for 5 years. I want to get the expected count of mortality at each county and year to input in the Winbug. I wonder how ...
152 views

73 views

### How to make WinBUGS close when “Trap” occurs [closed]

I'm using R2WinBUGS to process several datasets in WinBUGS in "batch mode". Occasionally traps occur, mainly due to bad parameters (I guess), and I managed to avoid ...
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 ...
207 views

### Specification of logical node (with distribution?) in WINBUGS

For a piece of homework I have an assignment using WINBUGS which I must admit confuses me to say the least. Tangential to my question but I have a few stochastic nodes that are to be gamma ...
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!! ...
676 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), ...
433 views

### Undefined real result in a zero-inflated negative binomial

I have run a zero-inflated Poisson model in WinBUGS without problems, and now I am trying to run its equivalent negative binomial. However, I get an "undefined real result" trap message over and over. ...
936 views

### Estimation of the shape parameter of gamma distribution in Winbugs

I want to estimate the shape parameter of gamma distribution in Winbugs. I select gamma distribution as prior for shape parameter. Data set is generated using MATLAB as: ...
1k views

### Define Priors for Dirichlet Distribution parameters in JAGS

I'm defining a Multinomial-Dirichlet model in JAGS and want to assign some hyperpriors to the parameters of the Dirichlet distribution. In the WinBugs manual I read that "the parameters of Dirichlet ...
656 views

### How can I estimate the precision of a normal using a Gibbs sampler?

I am trying to estimate the precision $\tau$ of a normal distribution with either WinBUGS or OpenBUGS: $c \sim \text{normal}(\mu,\tau)$ $\mu \rightarrow \lambda \cdot t^{-\beta}$ \$\tau \sim \text{...