[R] WinBUGS with R

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Aug 22 19:15:17 CEST 2008



artimon wrote:
> 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		<- function(){list(beta=inits.beta,beta0=inits.beta0,taueps=1.0E-3)}
> parameters	<- list("sigma","beta","beta0","y.star")
> fitm		<- bugs(data,inits,parameters,model.file="model.bug",
> 		    n.chains=3, n.iter=n.iter, n.burnin=n.burnin, n.thin = n.thin,
> 		    debug=FALSE,DIC=FALSE,digit=5,codaPkg=FALSE,
> 		    bugs.directory="C:/Program Files/WinBUGS14/")
 >
> but I always get the following error:
> Error in FUN(X[[1L]], ...) : 
>   .C(..): 'type' must be "real" for this format
> 
> 
> I tried the web, but failed. Could anyone give me a clue?
> Best!
> 


- Your example is not reproducible for us (without the data).
- Is WinBUGS runnign correctly (see its output with debug=TRUE)?
- What does traceback() tell us?

Which versions of R, WinBUGS and R2WinBUGS are in use?

Uwe Ligges



More information about the R-help mailing list