Hi, I'm creating a hierarchical model where the hyper-parameters are alpha, beta, and tau in the following:
model
{
for (i in 1:NGroup)
{
beta[i]~dnorm(bmu,bprec)
a[i]~dnorm(amu,aprec) I(0.00001,)
tau[i] ~dgamma(taumu,tauprec)
}
for (i in 1:CodSR)
{ #loop over all Ro-S observations for Ncod
Ro[i] ~ dnorm(Rp[i],tau[Group[i]]) #evaluate prob. density of data
Rp[i] <- S[i]*exp(a[Group[i]]*(1-(S[i])/beta[Group[i]]))
}
bmu~dnorm(60,0.00000001)
bprec~dnorm(0.001,0.00001)
amu~dnorm(1,0.00000001)
aprec~dnorm(0.001,0.00001)
taumu~dgamma(0.01,0.01)
tauprec~dgamma(0.01,0.01)
#sddata<-1/sqrt(tau[])
mubeta<-mean(beta[])
sdbeta<-sd(beta[])
mualpha<-mean(a[])
sdalpha<-sd(a[]) #'SD in intercept across species
cvbeta<-sdbeta/mubeta #'CV in slope across species
cvalpha<-sdalpha/mualpha #'CV in intercept across species
}
Is there a problem in my code?
Thanks!
Rachel
-------------------------------------------------------------------
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
|