Hi,
I´m trying to use the Win2BUGS package from R and I have a similar problem
that reurns with the message:
Error in FUN(X[[1]], ...) : symbol print-name too long
But, there is no stray ` character in the file ( Sugestions given by: Duncan
Temple Lang <duncan>
Date: Mon, 26 Sep 2005 07:31:08 -0700 )
The progam in R is:
library(R2WinBUGS)
library(rbugs)
dat <-
list(x=c(49,48,50,44,54,56,48,48,51,51,50,53,51,50,51,54,50,53,50,49,51,47,53,50,49,55,53,48,54,46),
y=c(50,49,57,52,47,52,58,45,55,54,51,54,56,53,52,47,51,54,50,47,46,44,54,55,52,57,52,48,48,51))
dat <- format4Bugs(dat, digits = 0)
parm <- c("lbda")
bugs(dat, inits=list(NULL), parm, "d2.bug",
n.chains = 1, n.iter = 5000, n.burnin = floor(n.iter/2),
n.thin = max(1, floor(n.chains * (n.iter - n.burnin)/1000)),
bin = (n.iter - n.burnin) / n.thin,
debug = TRUE, DIC = TRUE, digits = 5, codaPkg = FALSE,
bugs.directory = "C:/WinBUGS14/",
working.directory = NULL, clearWD = FALSE)
The objective of the program is to compare means of two independent
samples
that results
in Beherens-Fisher posterior and in the model.file of WinBUGS "d2.bug"
there is the following codes:
model
{
for( i in 1 : 30 ) {
x[i] ~ dnorm(mu1,sig1)
}
for( i in 1 : 30 ) {
y[i] ~ dnorm(mu2,sig2)
}
mu1 ~ dnorm(50,1.0E-6)
sig1 ~ dgamma(0.001,0.001)
mu2 ~ dnorm(50,1.0E-6)
sig2 ~ dgamma(0.001,0.001)
lbda <- mu1 - mu2
}
I´m a new user of WinBUGS and if someone detect error in the model codes
too, I´m grateful.
Thanks for help!
Gilberto Matos.
model
{
for( i in 1 : 30 ) {
x[i] ~ dnorm(mu1,sig1)
}
for( i in 1 : 30 ) {
y[i] ~ dnorm(mu2,sig2)
}
mu1 ~ dnorm(50,1.0E-6)
sig1 ~ dgamma(0.001,0.001)
mu2 ~ dnorm(50,1.0E-6)
sig2 ~ dgamma(0.001,0.001)
lbda <- mu1 - mu2
}
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html