Dear all,
Starting from the standard multinomial model I want to introduce a
respondent-specific scaling parameter s[n], which is distributed lognormal
with mean 1 and standard deviation tau. For the model to be identified, I
need to constrain the mean of s[n] to be equal to 1.
I searched and tried many things, but can't find out how to do this in
Winbugs. Could anyone please help?
Thank you very much,
Marcel Jonker
model {
# N = number of respondents
# T = number of choice questions per respondent
# A = number of alternatives per choice question
for (n in 1:N){
for (t in 1:T){
y[n, t, 1:A] ~ dmulti( prob[n, t, 1:A] , 1 )
for (a in 1:A){
prob[n,t,a] <- phi[n,t,a] / sum(phi[n,t,])
# log(phi[n,t,a]) <- b1*var1[n,t,a] + b2*var2 [n,t,a] + b3*var3[n,t,a]
log(phi[n,t,a]) <- s[n]*b1*var1[n,t,a] +s[n]*b2*var2 [n,t,a]
+s[n]*b3*var3[n,t,a]
}}}
# constrain mean of s[n] to 1
# ??
# priors
b1 ~ dnorm(0, 0.001)
b2 ~ dnorm(0, 0.001)
b3 ~ dnorm(0, 0.001)
for (n in 1:N){
s[n] ~ dlnorm(1,tau)}
tau ~ dgamma(0.05, 0.0005)
}
-------------------------------------------------------------------
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
|