Displaying 20 results from an estimated 2000 matches similar to: "R and WinBUGS (via R2WinBUGS) error"
2009 Jan 19
1
WinBUGS with R
Dear UseRs,
I am having some problems using R with WinBUGS using the R2WinBUGS
package. Specifically, when I try to run bugs() I get the following
message.
Error in FUN(X[[1L]], ...) :
.C(..): 'type' must be "real" for this format
>
To give a little more context, my bugs() command (for a multilevel
ordinal logit similar to Gelman and Hill, Data Analysis Using
2008 Aug 22
2
WinBUGS with R
Dear Users,
I am new to both of things, so do not blame me too much...
I am busy with semiparametric regression and use WinBUGS to sample
posteriors.
The code to call Winbugs is as follows:
data <- list("y","X","n","m") #My variables
inits.beta <- rep(0,K)
inits.beta0 <- 0
inits <-
2007 Jul 26
2
error in using R2WinBUGS on Ubuntu 6.10 Linux
I am trying to run WinBUGS 1.4 from the Ubuntu 6.10 Linux distribution. I am using the R2WinBUGS packages with the source file listed below. WinBUGS appears to run properly, but I get the following message after WinBUGS starts in WINE. Does anyone know what may be causing this error and what the correction may be?
Thanks
ERROR MESSAGE:
fixme:ole:GetHGlobalFromILockBytes cbSize is 13824
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+
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]
2010 Jan 19
1
Help on using WinBUGS on Mac
Dear all,
I had trouble in setting up WinBUGS on my Mac, and I'm seeking for some help
here.
I followed the instruction by Tom Palmer here:
http://www.ruudwetzels.com/MacBUGS/winbugsonmacosx.pdf
I installed Darwine 1.1.21, and downloaded WinBUGS14. However, when I
double-clicked the WinBUGS14.exe file, a black-box dialog window poped up,
and I got error message in the Wine log as
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
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.
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,
2012 Jun 06
1
error calling Winbugs using R2WinBugs to run a multi-level model
Dear all,
I'm calling Winbugs (1.4.3) through R2WinBugs (2.1-18 coda_0.14-7) to
fit a switching random walk model, but come up with an instant trap
with the log only displaying 'check('.
I will paste the trap with session info below; I'd be very grateful
for any ideas.
Couple of leads:
1. I presume the problem relates to the r package itself or the way I
call bugs(), because I
2012 Feb 01
1
problem working directory WinBUGS using R
Hi,
I am trying to use WinBUGS using R, but i am having some problems using
bugs function:
out <- bugs(data = win.data, inits = inits, parameters.to.save = params,
model.file = "model.txt",
n.thin = nt, n.chains = nc, n.burnin = nb, n.iter = ni, debug = TRUE, DIC =
TRUE, working.directory = getwd())
ls()
WinBUGS file is in working directory=D:/Line/documents but R looks for
2011 Jan 14
1
R2WinBUGS-Windows 7
Dear all,
I'm having a slight issue with R2WinBugs.... it cannot detect where WinBUGS is located.
Q: How can I change the default path?
Any advice is greatly appreciated. Thanks.
Regards
Erica
I'm using R2WinBUGs (R version 2.21.1) on windows platform (Windows 7).
I have downloaded WinBUGS14.exe and patch 1.4.3.
As i'm working with Windows 7 (similiar issues to Vista occur),
2008 Apr 16
3
Problems with R2WinBUGS
Hello,
I am trying to use R2WinBUGS to conduct a mixed treatment comparison (MTC)
analysis. On the surface, it seems to me that I am following the correct
steps: (1) reading the data into R, (2) specifying initial values for the
parameters in the model and (3) fitting the model to the data using the
bugs() function in R2WinBUGS. However, I get the error message
2008 Feb 29
1
bugs.seed= and summary.only= option in R2WinBUGS
Dear R user:
I am using R2WinBUGs to call WinBUGS from R. But I have some problems in
using either the option bugs.seed and summary.only in the function bugs.
Here are the programs and error messages. It appears that if I don't use
either option, the program runs fine. I am using R2.5.1 and WinBUGs14.
The program is not running:
> schools.sim <- bugs(data, inits,
2010 Apr 08
1
a small question about R with Winbugs
I try to do a test for dirichlet process for Multivariate normal, but Winbugs
always says "expected multivariate node", does that mean I miss something at
initialization? I will really appreciate the help to solve this problem
Here is the R code, and Winbugs code.
model
{
for(i in 1:N){
y[i,1:2] ~ dmnorm(mu[i,],tau[i,,])
S[i] ~ dcat(pi[])
mu[i,1:2] <- mu.star[S[i],]
2005 Sep 22
1
R2WinBUGS: Data loading error
Hi R-Help!
I am trying to use R2WinBUGS but I get the following error message in WinBUGS
(and there must be something wrong with my R statement as I tried it directly in
WinBUGS and it worked):
display(log)
check(C:/Documents and Settings/Daikon/Roche/pop_model.txt)
model is syntactically correct
data(C:/Documents and Settings/Daikon/Roche/data.txt)
expected key word structure
compile(7)
...(and
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 Jul 21
1
R2WinBUGS awkward to use
Hi All
Does anyone know if I can avoid to use the write.model() function below? I dont
want to do this. Can't bugs() do that automatically for me just by specifying
the 4th argument 'model'? Just I like I am also using the 'inits' object!
If I use 'model' in the same way as I use 'inits' I am getting the error:
> sim <- bugs(data, inits, parameters,
2006 Apr 05
2
R2WinBUGS error
Dear R-help,
I'm using the R2WinBUGS package and getting an error message:
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file 'codaIndex.txt', reason 'No such file or
directory'
I'm using R 2.2.1 and WinBUGS 1.4.1 on a windows machine (XP). My R code
and WinBUGS code is given below.
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