Re: Help with BUGS model
- From: "sci.stat.math" <franco@xxxxxxxx>
- Date: Thu, 23 Aug 2007 08:33:05 -0700
On 22 aug, 15:16, vontres...@xxxxxx wrote:
This seems to work as an extension of your code:
model
{
for (i in 1:K)
{
Signal[i] <- mu[i]/E[i]
N[i]~ dpois( mu[i] )
mu[i]<- lambda[i]*E[i]
lambda[i] <-P*lambda1[i]+(1-P)*lambda2[i] #result of equation 4.
lambda1[i] ~ dgamma( a1, b1 )
lambda2[i] ~ dgamma( a2, b2 )
}
a1 ~dunif(0.000001, 100)
b1 ~ dunif(0.000001, 100 )
a2 ~dunif(0.001, 100)
b2 ~ dunif(0.001, 100 )
P~dbeta(10,100)}
}
Dear Mark, I tested the model with a simulated dataset (simulate N and
E) it works. However the parameters of the mixture of gamma
distributions do not converge well (the samplesHistory shows a bad
interation pattern for the P and the as and bs.
With the model where the Lambdas are drawn from only one gamma prior I
have very good iteration pattern on the other hand. What do you think
is the explanation for that?
.
- Follow-Ups:
- Re: Help with BUGS model
- From: vontressms
- Re: Help with BUGS model
- References:
- Help with BUGS model
- From: sci.stat.math
- Re: Help with BUGS model
- From: vontressms
- Help with BUGS model
- Prev by Date: Afonso doesn't know what a p-value is!!!!
- Next by Date: Re: Solutions manual
- Previous by thread: Re: Help with BUGS model
- Next by thread: Re: Help with BUGS model
- Index(es):