I'm modeling a Bayes net with OpenBUGS, and I find problems to specify some of the parameters and their priors.
The aim of the model is to identify latent groups in the data from a sample of human participants. Eventually, I need a belief distribution over the range of 5 possible latent groups, for each individual, conditional on the observed data.
In my model, the observed data D come from a normal distribution with mean theta. The value of theta is fixed and depends on the state of a third variable, G, which represents the latent groups. This works such that, if the variable G possesses value 1, theta equals x, if G=2, theta=y, and so on, up to an arbitrary and low number of predefined latent groups (it's actually 5 groups in my current problem). Note that the number of latent groups and their respective values for theta are defined by the experimenter, so this is not a typical clustering problem. In fact, each latent group corresponds to the prediction of one different theory about the experimental situation.
I don't know how to include the specification for theta in the BUGS model. That should be added in the code below (I simplified it a lot for posting here):
model {
for (i in 1:NumberOfParticipants){
D[i] ~ dnorm(theta[i],lambda[i])
lambda[i] ~ dgamma(.01,.01)
p<-1/5
G[i] ~ dcat(p[]) # assume that all latent groups are equiprobable a priori?
}
}
I need to indicate in this code how a given value of theta is determined by the latent group to which the current participant silently belongs. I admit that my approach to the problem could be completely wrong.