Could someone please help me regein my sanity. I'm trying to fit the model
below using WinBugs, but when I generate initial values, I get an error
message saying 'precision parameter of normal must be posative' (their
spelling, not mine!). As far as I can see, all my precisions (i.e. dTau
and aTau) are gamma distributed. Using more informative priors solves the
problem, but I'm worried that something fundamentally strange is happening.
Thanks in advance for any answers - I'll post any replies that seem of
general relevance.
The model:
model;
{
for( p in 1 : Past ) {
for( i in 1 : N ) {
Count[i , p] ~ dpois(rate[i , p])
log(rate[i , p]) <- density[p] * exp(log(c[p]) - log(2 * alpha[p])
- loggam(1 / c[p]) - pow(distance[i] / alpha[p],c[p]))
}
}
for( p in 1 : Past ) {
c[p] ~ dgamma(cShape,cScale)
alpha[p] ~ dnorm(aMu,aTau)
density[p] ~ dnorm(dMu,dTau)
}
cShape ~ dgamma(0.001,0.001)
cScale ~ dgamma(0.001,0.001)
dMu ~ dnorm( 500.0,1.0E-2)
dTau ~ dgamma(0.001,0.001)
aMu ~ dnorm( 500.0,1.0E-2)
aTau ~ dgamma(0.001,0.001)
}
The data:
distance[] Count[,1] Count[,2] Count[,3] Count[,4] Count[,5]
1 468 420 990 33 78
50 135 280 601 13 53
100 64 96 361 23 60
200 19 119 114 49 47
400 50 93 76 3 67
800 46 33 420 5 75
list(N=6, Past=5)
Bob
Bob O'Hara
Department of Ecology and Systematics
Division of Population Biology
PO Box 17 (Arkadiankatu 7)
FIN-00014
University of Helsinki
Finland
email: [log in to unmask]
ICQ: 7178841
tel: +358-9-191 7382
fax: +358-9-191 7492
To find out how the Finns waste their money, look at
http://www.helsinki.fi/science/metapop/
You can also admire the background at this site:
http://www.helsinki.fi/science/fragland/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|