similar to: How do you calculate DIC from coda files (R2WinBUGS)?

Displaying 20 results from an estimated 5000 matches similar to: "How do you calculate DIC from coda files (R2WinBUGS)?"

2010 Sep 09
1
R2WinBugs problem
I'm having difficulty running R2WinBugs on a setup that previously worked for me (Dell Laptop, Windows XP service pack 3, R 2.11.1, WinBugs 1.43) . When I issue the following command smds.sim <- bugs (data, inits, parameters, "SMDSbrandLoc2.bug", debug = T, n.thin = n.thin, n.chains = n.chains, n.burnin = n.burnin, n.iter = n.iter) I get the following error in R
2007 Jan 12
1
R2WinBugs and Compare DIC versus BIC or AIC
Dear All 1) I'm fitting spatial CAR models using R2Winbugs and although everything seems to go reasonably well (or I think so) the next message appears from WINBUGS 1.4 window: gen.inits() Command #Bugs: gen.inits cannot be executed (is greyed out) The question is if this message means that something is wrong and the results are consequently wrong, or Can I assume it as a simple warning
2006 Nov 30
0
R2WinBUGS - parameter monitor seting
R2WinBUGS users, I'm getting the error message "monitor could not be set" when I try to monitor (and output to R) a response variable that includes missing data (NAs)...ie.e imputing for y. Setting monitors for other parameters works OK and running the R-generated WinBUGS script file in WinBUGS, also works OK. Below is my R code and the log.txt file output by R2WinBUGS. As I want to
2007 Apr 29
0
Going from Coda Files to R2WinBUGS
I'm currently using JAGS as my Bayesian program of choice due to working off of an older mac running OSX. I'd like to utilize some of the functions from R2WinBUGS, however. As such, I'm attempting to write something to go from coda output dumped by JAGS into the bugs object format - I've looked for functions that will convert from an mcmc object to a bugs object, but
2009 Dec 16
1
WinBUGS - R2WinBUGS problem
Appologies for cross-posting Dear R users, I am using R2WinBUGS to call WinBUGS from R. After loading data, model, and initial values I call this command res <- bugs(data = dfile, inits = list(ifile), parameters.to.save = c("beta"), model.file = mfile, working.directory = tdir, n.thin = nthin, n.chains = 1, n.iter = niterations*nthin, n.burnin = 0, DIC = F, debug = T,
2005 May 25
1
The error while using R2WinBUGS
Dear all, I tried to run WinBUGS model in R by using package R2WinBUGS, but I failed because of the massage : cannot calculate DIC for model in log file of WinBUGS14. In fact, the model works in WinBUGS and I can get summaries of the model, such as density, stats..., except DIC , because DIC may not be appropriate in this kind of model due to some reasons(according to the manual of WinBUGS14),
2005 Jul 27
1
error message running R2WinBUGS
*Dear R-user, * I try to run Winbugs from R using bugs function in R2WinBUGS.My model works well in Winbugs except that I can't get DIC. Since I don't need DIC, when I try to run Winbugs from R , I set "DIC=FALSE". My model is as following: model { for (i in 1:N) { for(j in 1 : T ) { x[i, j] ~ dbin(p[i, j],n[i]) #Hier.prior p[i, j] ~ dbeta(alpha[i, j], beta[i, j]) alpha[i, j]
2009 Jul 16
1
Error with r2winbugs
Hi, I am trying to do run the following model saved in "C:/bugs/sus.bug" model { for (i in 1:n){ y[i] ~ dpois(lamdba[i]) log(lambda[i]) <- mu+bmale[male[i]]+bschn[schn[i]]+epsilon[i] # epsilon[i] ~ dnorm(0,tau.epsilon) } mu ~ dnorm(0,.0001) bmale ~ dnorm(0,.0001) tau.epsilon <- pow(sigma.epsilon, -2) sigma.epsilon ~ dunif(0,100) for (j in
2007 Nov 24
1
R2winBUGS | option to turn off GUI?
Greetings - I run a multi-pro server box (GNU/Linux), on which I've installed winBUGS under wine. Works fine, and plays nice with r2WinBUGS, provided everything is done through a graphical front-end (either by working from console, or using a virtual desktop via VNC or equivalent). However, I'm wondering if there is a way to use R2winBUGS and winBUGS such that winBUGS does not spawn
2009 Aug 16
2
Question regarding finding credible interval using r2winbugs
Dear I am trying to find a 90% credible interval. I am using the following code. fit<-bugs( model.file=BUGScode, data=data, inits = list(geninits1,geninits2), parameters.to.save=keepers, n.chains=nchains, n.iter=runs, n.burnin=burn, n.thin=nthin, DIC= TRUE, bugs.directory="C:/Program Files/WINBUGS.14", \ ) But this is only giving 95%
2009 Oct 06
2
R, Coda, and OpenBUGS
Hi All, I am trying to figure out how to use R-Coda with the output from OpenBugs. I have installed and loaded the packages BRugs and R2WinBUGS. I have successfully run a simple Bayes model in WinBUGS using R2WinBUGS' "bugs" and have used "read.bugs" to build the coda object. I can successfully switch to OpenBugs and run the same model and get the basic summary
2012 Dec 04
1
Winbugs from R
Hi, I am trying to covert a Winbugs code into R code. Here is the winbugs code model{# model’s likelihoodfor (i in 1:n){time[i] ~ dnorm( mu[i], tau ) # stochastic componenent# link and linear predictormu[i] <- beta0 + beta1 * cases[i] + beta2 * distance[i]}# prior distributionstau ~ dgamma( 0.01, 0.01 )beta0 ~ dnorm( 0.0, 1.0E-4)beta1 ~ dnorm( 0.0, 1.0E-4)beta2 ~ dnorm( 0.0, 1.0E-4)#
2012 Oct 03
1
Errors when saving output from WinBUGS to R
Dear all I used R2WinBUGS package's bugs() function to generate MCMC results. Then I tried to save the simulation draws in R, using read.bugs() function. Here is a simple test: ###################### library(coda) library(R2WinBUGS) #fake some data to test beta0=1 beta1=1.5 beta2=-1 beta3=2 N=200 x1=rnorm(N, mean=0,sd=1) x2=rnorm(N, mean=0,sd=1) x3=rnorm(N, mean=0,sd=1) lambda2= exp(beta0+
2009 May 30
1
Help for running R2WINBUGS in VISTA
Dear, I am running the following R code using the R2WINBUGS package. fit<-bugs( model.file=BUGScode, data=data, inits = list(geninits1,geninits2), parameters.to.save=keepers, n.chains=nchains, n.iter=runs, n.burnin=burn, n.thin=nthin, bugs.directory="C:/Program Files/WinBUGS14" ) I put this code and the corresponding WINBUGS code "BUGScode" in the same folder
2008 Jan 04
2
R2WinBUGS sending variables as factors
Hello R and BUGS users, I am writing a heirarchical model in R to send to BUGS via R2WinBUGS and I am finding it difficult to get the model to run. I seem to be having two problems. 1) I can't seem to send variables classed as factors (Month), is there a way do this? 2) Checking the Log in WinBUGS I can see that the model is Syntactically correct, but Bugs is not able to recognise the the
2010 Jun 23
1
A question about R2Winbugs
Dear R users: I was trying to fit a HMM with mixture of Gaussian into the dataset, and I tried to implement it by R2Winbugs. But I got the following errer. * Error in FUN(X[[1L]], ...) : .C(..): 'type' must be "real" for this format* Does anybody know what's the problem? Does R2Winbugs accept some matrix as inits? I would really appreciate your help. Thank you very much.
2010 May 06
1
BRugs dwwinn.exe error
Hi, I have a strange behaviour of openBUGS and WinBUGS when I start them from R. Version: R: 2.10.1 openBUGS: 3.07 WinBUGS: 1.43 R2WinBUGS: 2.1-16 BRugs: 0.5-3 I have a model and data without initial start values. If I use the stand alone versions of openBUGS and WinBUGS I don't have any problems and I get what I want. If I use function bugs() from R2WinBUGS- resp. BRugs-Library then
2010 Nov 15
2
Zero truncated Poisson distribution & R2WinBUGS
I am using a binomial mixture model to estimate abundance (N) and detection probability (p) using simulated count data: -Each site has a simulated abundance that follow a Poisson distribution with lambda = 5 -There are 200 simulated sampled sites -3 repeated counts at each site - only 50 percent of the animals are counted during each count (i.e, detection probability p =0.5, see codes) We removed
2011 Oct 20
1
Are they fully identical: WinBUGS and OpenBUGS; R2WinBUGS and R2OpenBUGS
Hello ALL! I am running Linux, Fedora 15 64-bits, and R on it. I need to use WinBUGS and R2WinBUGS, but as far as I read, WinBUGS is closed project, to be continued with/as OpenBUGS. Thus, I have found R2OpenBUGS on OpenBUGS Contributed Code (http://openbugs.info/w/UserContributedCode), not on CRAN. Author(s) states that it is equivalent for R2WinBUGS. I tried briefly, and realized few minor
2007 Nov 23
2
R2winBUGS & WinBUGS gui
I am trying to figure out if it is possible to run winBUGS from within R, using R2winBUGS, without having winBUGS spawn any windows (basically - 'true' batch - no GUI actions at all). The reason being I have a machine which I (and several others) ssh/telnet into, and would like to run winBUGS without having to mount a virtual desktop of any kind. I've looked through the r2winBUGS