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
1
vote
1
answer
63
views
Zero and One tricks for INLA?
The Zero and One tricks are used to sample from a model not included in the basic functions in BUGS:
http://www.medicine.mcgill.ca/epidemiology/Joseph/courses/common/Tricks.html
I have a general and ...
1
vote
1
answer
77
views
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 ...
2
votes
1
answer
900
views
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 ...
0
votes
0
answers
622
views
Posterior Predictive Check for Hierarchical Logistic Regression Model
I need to apply Posterior Predictive Check (PPC) on Hierarchical Logistic Regression Model (so I have binary outcome) to validate my model (to see goodness of fit of my model). I know that I need to ...
1
vote
0
answers
198
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
0
answers
783
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
0
answers
558
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, ...
2
votes
0
answers
304
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
0
answers
80
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
1
answer
942
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
1
answer
789
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
1
answer
731
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 ...
8
votes
0
answers
1k
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
0
answers
729
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 ...
4
votes
0
answers
1k
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
1
answer
551
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
0
answers
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
0
answers
427
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 ...
2
votes
0
answers
5k
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 ...
7
votes
1
answer
3k
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
1
answer
2k
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
1
answer
251
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 ...