I was trying to run something similar to the multi-species model in the Mackenzie et al. (2006) book, but for a larger number of species.
The model I used is included below. I have temporarily posted some results at the URL below. Is this model at all reasonable?
http://www.akentsoc.org/tmp/fiddling.pdf
model
{
## For each species...
for (s in 1:S)
{
## For each plot...
for (n in 1:N)
{
## True occupancy (z) at each site
## is distributed Bernoulli with rate psi.
z[s,n] ~ dbern(psi[s,n])
logit(psi[s,n]) <- m[s,n]
m[s,n] <- beta[s,s] + inprod(beta[s,],t[s,,n])
for (s2 in 1:S)
{
t[s,s2,n] <- abs(1 - equals(s2,s)) * z[s2,n]
}
## For each of the visits...
for (v in 1:V)
{
## Observed presence-absence (o)
## is distributed Bernouli with rate p
o[s,n,v] ~ dbern(q[s,n,v])
q[s,n,v] <- z[s,n]*p[s]
}
}
}
## priors, etc.
for (s1 in 1:S)
{
p[s1] ~ dunif(0,1)
for (s2 in 1:S)
{
beta[s1,s2] ~ dnorm(0,0.1)
}
psi.m[s1] <- mean(psi[s1,])
}
}