The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [open-bugs]

OpenBUGS is an open-source version of BUGS, which is a software package for performing Bayesian inference Using Gibbs Sampling.

Filter by
Sorted by
Tagged with
2
votes
0answers
54 views

How to specify a new joint prior distribution restricted to (0,1) interval in WinBUGS?

I am doing some Bayesian analysis in OpenBUGS and I need to specify a joint prior distribution for parameters $\gamma_1$ and $\gamma_2$ (the Jeffreys prior related to my model), such that $$\pi(\...
1
vote
0answers
443 views

MCMC chain stuck in adaptive phase?

I'm using R,OpenBUGS and R2OpenBUGS package on Linux Mint and i'm fitting a bayesian multinomial logistic model. After dribbling a lot of usual errors on my way to get my model running, i came upon an ...
2
votes
0answers
320 views

Deviance n.eff in R becoming 1 at high sample n

I've been doing some basic bayesian t-tests in OpenBUGS, and later JAGS (via a friendly biometrician), and in both cases I ran into a bizarre property of the R-2- packages on the output. Specifically, ...
1
vote
0answers
192 views

OpenBUGS example: Stagnant, a changepoint problem and an illustration of how NOT to do MCMC! - Why is the second parameterization better?

I am working on an Bayesian problem from an OpenBugs example: Stagnant, a changepoint problem and an illustration of how NOT to do MCMC!. This is a changepoint problem. Basically we assume a model ...
1
vote
0answers
55 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 ...
5
votes
1answer
498 views

Can improper priors be implemented in some way?

I'm new to bayesian inference. I've just discovered that improper priors can't be specified in WinBUGS/OpenBUGS. I was wondering if this is common or not in bayesian inference. Are there same cases ...
1
vote
1answer
522 views

WinBUGS: multiple definitions of node [duplicate]

I wrote this code in WinBUGS but I can't run it! It says 'multiple definitions of node tau' ...
1
vote
1answer
380 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
757 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
600 views

Longitudinal data format in WinBUGS or OpenBUGS, different number of items per time point

I am working with longitudinal data, where there are a different number of "items" per time point. I am working with the MCMCdynamicIRT1d function in ...
2
votes
1answer
889 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{\...
1
vote
1answer
372 views

Predicting time series with OpenBUGS

I have a number of fairly short time series (about 4–100 observations) which I need to forecast into the future. I decided to use Bayesian inference, because there is external information about each ...
2
votes
0answers
2k views

Dummy coding from a Bayesian point of view

If we want to use categorical variables in regression context, we are allowed to use dummy codings such as these schemes. Is this also required in a Bayesian (MCMC) context, such as with WinBUGS/...
1
vote
0answers
337 views

Is it possible to model BOTH censoring and truncation in BUGS?

Survival times are often right censored and left truncated. From my experience, it does not seem like OpenBUGS allows for both. Truncation is denoted as T( , ) and censoring as C( ,). For instance, a ...
1
vote
0answers
4k 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 ...
6
votes
1answer
2k 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 ...
2
votes
1answer
1k 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{...
0
votes
1answer
208 views

SV model estimation in R using tsbugs

I have been trying to estimate the basic stochastic volatility model using OpenBUGS via R and at an stage of the following command. Please can you comment for the ...