Skip to main content

Questions tagged [bugs]

BUGS is an acronym for Bayesian inference Using Gibbs Sampling; BUGS is also a software package for doing this. Use for all versions of BUGS, also WINBUGS and OpenBUGS.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Why is coin different from poin in WinBUGS

I have the following WinBUGS model and the output densities of interest. I want to understand why the density of coin is different from that of poin. Understanding this will help me to understand ...
Chika's user avatar
  • 1
0 votes
0 answers
43 views

Why are my training and validation curves suspiciously close to one another (sklearn neural network)

I am trying to graph the accuracy, error and precision scores over epoch for a neural network and am using cross validation. However, my training and validation scores are practically on top of one ...
iron_carbon's user avatar
1 vote
2 answers
73 views

Missing data imputation in univariate meta analysis with binary data using WinBUGS

I want to impute missing data in univariate meta-analysis. My outcome (no. fractures) is a binary variable. Below is the WinBUGS code I have tried. The code is ...
M Attanayaka's user avatar
1 vote
0 answers
87 views

Hiearchical Beta-Binomial model via rjags: How to draw posterior sample/do inference on posterior exactly?

I have the following code for bugs model which I want to use with rjags: ...
Kana's user avatar
  • 21
1 vote
1 answer
75 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 ...
not that INLA's user avatar
0 votes
1 answer
445 views

Jags: Attempt to redefine node error, mixed effect regression [closed]

I want to perform a mixed effect regression in rjags, with a random slope and intercept. I define the following toy dataset: ...
denis's user avatar
  • 201
1 vote
0 answers
236 views

How to fit a mixture of 2D Gaussian in BUGS/JAGS?

I am trying to estimate the parameters of a mixture of 2D Gaussian distribution using JAGS. I first created two components from a multivariate normal distribution and then combined them to get a ...
Shiva Kazempour's user avatar
1 vote
1 answer
86 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 ...
Pulkit Srivastava's user avatar
2 votes
1 answer
792 views

How many chains should i run in winBUGS?

i am relatively new to winBUGS and i am running a meta-regression model for bayesian meta-analysis. This model tracks the posterior distributions of the parameters mean and tau-square. Moreover,which ...
Selly's user avatar
  • 43
2 votes
1 answer
1k 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 ...
Zhou Feng's user avatar
0 votes
1 answer
949 views

How to correctly include offset in Bayesian Zero-Inflated Poisson model in winbugs

I am trying to fit a Bayesian Zero-inflated model and I want to include an offset term. When I compared the output of the pscl package; the result of the count model from the winbugs and pscl package ...
tk001's user avatar
  • 23
0 votes
0 answers
661 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 ...
yer's user avatar
  • 125
2 votes
0 answers
52 views

Is there something wrong with my Bayesian hierarchical spatio-temporal model?

I built a Bayesian spatio-temporal model and one of the parameters to be estimated is the random spatial effects s. The random spatial effect is assigned an intrinsic conditional autoregressive prior (...
Outlier's user avatar
  • 123
3 votes
2 answers
758 views

Are "improper uniform priors" in Bayesian analysis equivalent to maximum likelihood estimations?

The improper uniform distribution for parameter $\theta$ is : $p(\theta)=1,\ for -\infty<\theta<\infty$. It is called "improper" since it does not integrate to 1. Because Bayesian theorem is ...
T X's user avatar
  • 1,027
3 votes
1 answer
962 views

Bayesian p-value in wrong direction using step function in JAGS / BUGS

I have estimated a Weibull regression model in JAGS using rjags and R2JAGS. The estimated posterior predictive p-values using the step() function confuse me. They make sense (comparing them to lower ...
Ben's user avatar
  • 205
3 votes
0 answers
489 views

How to specify a zero-inflated Dirichlet model in JAGS/BUGS

There was a recent publication discussing the advantages of the zero-inflated dirichlet for microbiome count data which is compositional (you are modeling a matrix of species relative abundance data ...
colin's user avatar
  • 1,242
0 votes
1 answer
424 views

Predict credible interval of Poisson-distributed response based on Lambda credible interval

I am approaching Bayesian inference. Could you review my steps and give me a hand with my model predictions? I am using a N-mixture model to predict how many individuals N of a rare species inhabit a ...
Federico's user avatar
0 votes
1 answer
970 views

How to interpret Zero-Inflated Poisson in WINBUGS?

I have Winbugs code for a zero-inflated Poisson (ZIP) model. I obtained this code from my lab at university and the person who wrote it is not accessible for me to ask questions. Here is the code: <...
user121's user avatar
  • 319
2 votes
1 answer
150 views

How to interpret zero-inflation model for Bayesian regression?

I am trying to understand the zero-inflated poisson (ZIP) model used in Bayesian regression modelling. I came across code here for the ZIP model. My question is related to the 3rd line of code within ...
user121's user avatar
  • 319
1 vote
0 answers
210 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(\...
Guilherme Oliveira's user avatar
2 votes
1 answer
367 views

How does WINBUGS determine the posterior density of a parameter with multiple chains?

I am a new user to WINBUGS. I am running a model with 2 chains. When my model has finished running I have the following posterior density plot of my parameter: The plot only shows one distribution (i....
user121's user avatar
  • 319
1 vote
1 answer
363 views

How do interpret a vague prior for hierarchical modeling?

I am new to Bayesian analysis and using the following WINBUGS example to understand Bayesian hierarchical modeling: I have 2 questions: 1) For the fixed effects terms, i.e., the beta0 and beta1 ...
user121's user avatar
  • 319
0 votes
1 answer
907 views

How to identify prior for the precision parameter in Winbugs

I have the following model: ...
user3546966's user avatar
1 vote
2 answers
303 views

Framework for simulation study to validate bayesian models

I am looking for a framework that would allow to take JAGS/bugs model and on many sets of simulated data test if there is a bias (or not) in the parameter estimates (the real parameters would be known ...
Tomas's user avatar
  • 6,203
2 votes
1 answer
410 views

"Undefined real result" with inverse() function in WinBUGS

Using WinBUGS, I'd like to generate the posterior distribution for a function of several other variables (stochastic nodes). One step in building up this function involves taking the inverse of a ...
Sprog's user avatar
  • 41
2 votes
0 answers
390 views

How do I specify a random effect in Bayesian beta regression model?

My response data are proportions that I want to model with one continuous predictor and a random effect of group. Here's my winbugs code: ...
Desiree's user avatar
  • 21
1 vote
0 answers
164 views

Random effects in ZIP or ZINB models - count portion, Bernoulli portion, or both?

I'm building some zero-inflated models that need to include random effects, and I can't find a definitive answer for whether I should include the random effects in the part of the model that describes ...
Skylar Hopkins's user avatar
4 votes
1 answer
1k views

"Mixed effect" ANOVA in R with JAGS/BUGS

I would like to be able to code the following linear mixed model into a bayesian framework. In the traditional/frequentist view, the model would be coded like this: ...
Cédric_Frenette's user avatar
2 votes
0 answers
343 views

Standard Deviations of Random Effects

I would have a question regarding the estimates of the random effects for a model fitted with JAGS. I want to fit a mixed model of the form: $$y_{ij}=\beta_{0j}+\beta_{1j}x_{ij}+\beta_2+e_{ij}$$ $$\...
Benykō-Zamurai's user avatar
2 votes
0 answers
424 views

Comparing the Widths of two Posterior Distributions

I have a question regarding the task of my term paper case study, which is about Bayesian multilevel modelling and I would greatly appreciate it, if you could help me out. The exact assignment reads ...
Benykō-Zamurai's user avatar
2 votes
1 answer
3k views

How do I calculate the posterior predictive distribution in WinBUGS?

I would like to work out the posterior predictive distribution from the following multilevel (mixed effect) model in WinBUGS. The example is taken from an example I found online for illustrative ...
gemster's user avatar
  • 25
1 vote
1 answer
130 views

Winbugs fixed effects stats output: mean or median?

I am running a fixed effects hazard ratios model with WinBUGS and I can't tell if I've run into a potential problem. In the stats output, my mean and median are similar, but generally differ by ...
Tom's user avatar
  • 111
0 votes
1 answer
704 views

Cumulative link model in JAGS or BUGS [closed]

I'm trying to implement a cumulative link model in JAGS. My outcome variable (Likert-style questionnaire) has four categories. There is currently no predictor in the model, I will add them once the ...
Alexander's user avatar
1 vote
0 answers
137 views

Meaning of Intercept Parameter in a Bayesian Longitudinal HLM

I have been working through John Kruschke's excellent book on Bayesian Data Analysis but now have found myself in experimental-design territory not covered in the book: a longitudinal linear mixed-...
llewmills's user avatar
  • 2,161
0 votes
1 answer
600 views

Winbugs beta distribution

I have fitted a likelihood function with a dbeta function in WinBUGs as follows ...
Adrian Santos's user avatar
0 votes
0 answers
187 views

Left or right skewed prior in WinBUGS

I am trying to find a proper way of defining a right or left skewed continuous (0...100) distribution for my priors in a simple linear regression. Furthermore, I expect to find some outliers in my ...
Adrian Santos's user avatar
3 votes
2 answers
4k views

Bayesian t-test assumptions

I know that the traditional independent t-test assumes homoscedasticity (i.e., equal variances across groups) and normality of the residuals. They are usually checked by using levene's test for ...
Adrian Santos's user avatar
0 votes
1 answer
112 views

Reference for modeling with WinBugs

Does anyone have any good reference for beginners in WinBUGS about modeling? I already have some familiarity with R, but I had never used R2WinBUGS before. I'm interested in making beta, beta ...
3 votes
1 answer
145 views

Recovering noise-free variables in binary trials

I have a collection of $N$ different objects. An expert "looks" at the object $O_i$ and produces a prediction: binary label $y_i\in\{0,1\}$. The predicted binary label $y_i$ is observed (data) and is ...
Vladislavs Dovgalecs's user avatar
2 votes
1 answer
2k views

Learning WinBUGS programming for network meta-analysis

I'm currently interested in learning NMA using WinBUGS. I studied the general concepts behind multiple treatment comparisons and i have a good base on classic pair-wise meta-analysis. I can also do a ...
0 votes
1 answer
439 views

Simple explanation of a WinBUGS code

Can anyone give me a quick walkthrough of what this code is doing? I think the line log( mu[i] ) <- alpha + beta * (year[i]-1970) + log( pop[i] ) is updating ...
Jon's user avatar
  • 57
2 votes
1 answer
5k views

WinBUGS error - undefined real result

I am trying to run this WinBUGS code to get a prediction for the number of fatalities in 1975 ...
Jon's user avatar
  • 57
0 votes
1 answer
2k views

Bayesian estimation of Dynamic Linear Models with RStan

I'm reading the Dynamic Linear Models with R book, where most of chapter 4 is devoted to bayesian estimation of parameters. They code most of it manually though, and it seems it can get quite tricky ...
Alex's user avatar
  • 247
2 votes
1 answer
1k views

Marginal prior $p(\mu)$ of mean of a normal distribution when both mean and variance are unknown

I read that if the data is normally distributed with mean $\mu$ and variance $\sigma^2$ (both unknown) then to have the joint posterior distribution $p(\mu, \sigma^2 | y)$ in closed form, one has to ...
Durin's user avatar
  • 1,053
0 votes
1 answer
556 views

Hierarchical Bayesian model - issues with JAGS/BUGS switching between lognormal and normal

I'm trying to construct a hierarchical model using JAGS, but I'm running into issues converting between normal/lognormal distributions and the more I stare at my problem, the more confused I get. ...
Peter's user avatar
  • 53
1 vote
0 answers
816 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 ...
Alex Karvouniaris's user avatar
1 vote
0 answers
94 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 ...
Pharmaco economics's user avatar
12 votes
1 answer
2k views

Which is the best method for network meta-analysis?

There are now several different approaches to perform a network meta-analysis or mixed treatment comparison. The most commonly used and accessible ones are probably the following: in a Bayesian ...
Giuseppe Biondi-Zoccai's user avatar
1 vote
0 answers
22 views

OpenBUGS intuition with data [duplicate]

I've recently discovered Bayesian statistics, currently I am experimenting with Openbugs, yet I cant grasp the concept of what happens with the inputted data. I understand mcmc, yet all of examples I'...
sdgaw erzswer's user avatar
1 vote
0 answers
171 views

Testing Key Assumptions of Cultural Psychology with Bayesian Analysis [closed]

I have been trying to come up with a way to represent some of the key assumptions of culture in actual measurement and statistical modeling practices. For all of these points, it seems like the ...
Xander's user avatar
  • 416