Questions tagged [open-bugs]

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

22 questions
8
votes
0 answers

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 Meyer and Yu (2006). I found WinBUGS code online…
ch-pub
  • 741
  • 1
  • 8
  • 22
7
votes
1 answer

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 and Wishart distributions and the order (N) of the…
user27115
  • 125
  • 1
  • 8
5
votes
1 answer

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 in which it's possible to implement a improper…
John M
  • 1,807
  • 17
  • 32
4
votes
0 answers

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{\sigma}{N})$ $\mu \sim \mathrm{Normal}(??,…
user1375871
  • 565
  • 5
  • 14
2
votes
0 answers

WinBUGS/OpenBUGS Gamma distribution parameters

According to the WinBUGS manual the gamma distribution is defined by: dgamma(r,mu) However, what is r? Is it the shape, scale or rate parameter? I'm pretty new to statistics and googling didn't really help. Above that in most explanations I've found…
Gerome Bochmann
  • 227
  • 3
  • 11
2
votes
1 answer

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{gamma}(0.1,0.001)$ I tried using a standard approach…
Gerome Bochmann
  • 227
  • 3
  • 11
2
votes
1 answer

CDF of non-standard normal random variable in OpenBUGS

I need to use the cumulative density function (CDF) a normal random variable with mean 0 and standard deviation which is not 1, but I do not know which function to use. I know the CDF of the standard normal random variable is phi(), but now I need…
2
votes
0 answers

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, my deviance in an analysis has collapsed to a…
twoyaks
  • 51
  • 3
2
votes
0 answers

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 with two straight lines that meet at a certain…
SixSigma
  • 2,152
  • 1
  • 14
  • 24
2
votes
0 answers

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/OpenBUGS, that we have to model k factors with k-1…
1
vote
0 answers

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 censored observation known to lie above 10 days,…
ATJ
  • 1,711
  • 1
  • 15
  • 20
1
vote
1 answer

how to overcome error while defining multiple loops for model specification in OpenBUGS?

I'm using following program for MCMC simulation. While compiling this code, I am getting error message which is multiple definition of node s[1]. I am not able to understand what is wrong with the codes. Can someone help me to solve this coding…
1
vote
0 answers

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(\gamma_1,\gamma_2)\propto…
1
vote
0 answers

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 error i can't get the grasp of how to solve it.…
1
vote
0 answers

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 coda library to do some diagnostics. The problem is that I can't apply these functions to the object returned by…
John M
  • 1,807
  • 17
  • 32
1
2