Questions tagged [winbugs]

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 (https://stackoverflow.com/q/5963269); for statistical questions please use crossvalidated.com.

WinBUGS

WinBUGS is a software program for Bayesian analysis of complex statistical models using Markov chain Monte Carlo (MCMC) methods. WinBUGS implements the BUGS language for defining Bayesian models. WinBUGS was created by Dave Lunn, Andrew Thomas, Nicky Best, and David Spiegelhalter in 1996. In 2007 the last stable version (1.4.3) was released. Thereafter development focused on the OpenBUGS project.

Official WinBUGS Documentation

Other Documentation

247 questions
0
votes
2 answers

WinBUGS - Defining a discrete stepwise distribution

I want to define a distribution in my model of the form: P(x=10)=0.10, P(x=15)=0.20, P(x=20)=0.70 The WinBUGS FAQ says it is possible construct my own discrete uniform distribution as a categorical variable with a uniform prior and which can take on…
JEquihua
  • 1,217
  • 3
  • 20
  • 40
0
votes
1 answer

Plotting fitted values vs observed ones in R or winbugs

I want to plot the fitted values versus the observed ones and want to put straight line showing the goodness of fit. However, I do not want to use abline() because I did not calculate the fitted values using lm command as my I used a model that R…
Günal
  • 751
  • 1
  • 14
  • 29
0
votes
1 answer

Probit model in winbugs

I conducted an analysis using a logit model and now want to do the same using a probit model. Can anyone please turn this winbugs logit model into a winbugs probit model? model { for (i in 1:n) { # Linear regression on logit logit(p[i]) <- alpha…
Günal
  • 751
  • 1
  • 14
  • 29
0
votes
0 answers

counterpart of tapply in winbugs

I need to calculate the mean of each state. In R, I did this by using tapply(y,state,mean). Here is an example: state <- rbinom(10,4,0.6) y <- rnorm(10) tapply(y,x,mean) where y represent the vector of the fitted values and state represent the…
Günal
  • 751
  • 1
  • 14
  • 29
-1
votes
1 answer

WinBugs if else using step function

I want to construct a model like Model3 <- function() { # Likelihood of the model for (i in 1:n) { response2[i] ~ dbern(p[i]) logit(p[i]) <- m[i] m[i] <- mfe[i] mfe[i] <- beta[1] + f[i] # the f functions or the if-else…
RFHCE
  • 1
  • 1
-1
votes
1 answer

Why matbugs never stops running?

I can run a model in WinBUGS14 with no problem and get the results, but I get a problem when I run the same WinBUGS model (shown as below) from MatLab. It looks the program never stops running and no results return. Can anyone help me. Any advice…
PHLYBY
  • 21
  • 3
-3
votes
1 answer

the error when I use R2WinBUGS packages

all, I employ the R packages R2WinBUGS to run Winbugs with R.However,the program is not able to work well.The following codes attached panel.bug: model{ for(i in 1:N){ for(t in 1:T){ y[i,t]~dnorm(mu[i,t],tau) …
wanhai
  • 17
  • 1
  • 5
1 2 3
16
17