Dear BUGS experts,
I appreciate you help on the following model:
Consider m observers each reading n subjects twice. We will have a panel of
n by m readings containing the number of positive readings for each observer
on each subject (between 0 and 2).
The model is a classical binormal SD with two additional random-effects:
between-observer variation and within-observer error. The parameters to be
estimated are X (population decision threshold), Vbs (between-subject
variance), Vbo (between-observer variance), and Vo (within-observer
variance).
Unfortunately, the model poorly converges, with high degree of
autocorrelation and frequent traps (unreal number) while updating.
Is there any way to improve model specification? Your help and advice is
highly appreciated.
Thanks,
Mohsen Sadatsafavi
Healthcare and Epidemiology,
University of British Columbia
________________________
model
{
#signal level in normal subjects
for (i in 1:nNormal)
{
signal[i]~dnorm(0,tbs)
}
#signal level in diseased subjects
for (i in nNormal+1:nNormal+nDiseased)
{
signal[i]~dnorm(1,tbs)
}
#observers' decision threshold
for(i in 1:nObs)
{
threshold[i]~dnorm(X,tbo)
}
#observations
for (i in 1:nNormal+nDiseased)
{
for (j in 1:nObs)
{
prob[i,j]<-phi((signal[i]-threshold[j])*sqrt(to))
response[i*nObs-nObs+j]~dbin(prob[i,j],2)
}
}
#priors
tbo~dgamma(0.001,0.001)
tbs~dgamma(0.001,0.001)
to~dgamma(0.001,0.001)
X~dnorm(0,0.001)
Vbs<-1/tbs #between-subject variance
Vo<-1/to #within-observer variance
Vbo<-1/tbo #between-observer variance
}
Initials
# Initials values are the true values used to simulate the observations
list(X=0.35,tbo=4,to=5,tbs=2)
Data
#response is the panel of observations (number of positive readings in two
observations), with subjects and observers on rows and columns,
respectively.
list(nNormal=25,nDiseased=25,nObs=50,response=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,2,1,0,1,0,2,2,2,0,0,0,0,2,0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2,0,1,2,2,2,2,
1,1,0,2,2,0,0,2,2,2,2,2,2,2,2,2,1,2,0,1,1,1,2,2,2,2,2,2,2,1,2,1,1,2,1,0,0,2,
2,2,1,2,2,2,0,2,1,2,2,0,0,2,0,1,1,1,0,1,2,2,2,2,2,2,2,2,0,2,1,1,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,1,1,2,1,2,2,2,2,2,2,2,2,2,2,1,0,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,1,2,2,2,1,2,2,2,1,1,1,2,2,0,
0,1,0,1,2,0,1,1,2,1,2,1,2,0,2,1,2,1,2,0,0,0,1,2,2,1,2,2,0,0,0,1,1,0,0,2,1,0,
1,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,1,2,2,2,2,2,1,2,2,2,2,2,2,2))
-------------------------------------------------------------------
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
|