Dear BUGS users,
in the "eyes" example, it is highly advised to add a constraint in the
normal mean lambda1 and lambda2 for convergence problem,
ie lambda1~N(0,1e-6)
and lambda2 <- lambda1 + theta
where theta is drawn from a truncated normal
model
{
for( i in 1 : N ) {
y[i] ~ dnorm(mu[i], tau)
mu[i] <- lambda[T[i]]
T[i] ~ dcat(P[])
}
P[1:2] ~ ddirch(alpha[])
theta ~ dnorm(0.0, 1.0E-6)I(0.0, )
lambda[2] <- lambda[1] + theta
lambda[1] ~ dnorm(0.0, 1.0E-6)
tau ~ dgamma(0.001, 0.001) sigma <- 1 / sqrt(tau)
}
I tried to extend to a mixutre of 3 normal
model
{
for( i in 1 : N ) {
y[i] ~ dnorm(mu[i], tau)
mu[i] <- lambda[T[i]]
T[i] ~ dcat(P[])
}
P[1:2] ~ ddirch(alpha[1:2])
theta[1] ~ dnorm(0.0, 1.0E-6)I(0.0, )
theta[2] ~ dnorm(0.0, 1.0E-6)I(0.0, )
lambda[1] ~ dnorm(0.0, 1.0E-6)
lambda[2] <- lambda[1] + theta[1]
lambda[3] <- lambda[2] + theta[2]
tau ~ dgamma(0.001, 0.001)
sigma <- 1 / sqrt(tau)
}
but it seems no to converge.
Did anybody face a similar problem before.
Any help is appreciated
Philippe Girard
> Dr Philippe Girard
Statistician
QS Department
Nestlé Research Center
PO Box 44, CH-1000 Lausanne 26
Phone: + 41 21 785 8871
Fax: + 41 21 785 8553
e-mail: [log in to unmask]
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|