# Tau.noninformative = 1.0e-2, # Tau.gamma = 1.0e-3, # Err.gamma = 1.0, model { # Observation for (i in 1:N.site) { for (j in 1:N.spc) { BZP[i, j] ~ dnorm(bzp[i, j], tau.err[1]) log(bzp[i, j]) <- log.bzp[i, j] } w.temp[i] ~ dnorm(W.temp[i], tau.err[2]) Fish[i] ~ dbern(p.fish[i]) p.fish[i] <- 1.0 - exp(-exp(z.fish[i])) z.fish[i] ~ dnorm(0, 1) } # Process for (i in 1:N.site) { for (j in 1:N.spc) { log.bzp[i, j] ~ dnorm(log.mu[i, j], tau.log.bzp[j]) log.mu[i, j] <- ( # log(biomass of zoo plankton) (betaB[1] + betaS[1, j]) + (betaB[2] + betaS[2, j]) * w.temp[i] + (betaB[3] + betaS[3, j]) * z.fish[i] ) } } # Parameters and hyper parameters for (j in 1:N.spc) { tau.log.bzp[j] ~ dgamma(Tau.gamma, Tau.gamma) } for (k in 1:N.beta) { betaB[k] ~ dnorm(0, Tau.noninformative) for (j in 1:N.spc) { betaS[k, j] ~ dnorm(0, tau.betaS[k]) } tau.betaS[k] ~ dgamma(Tau.gamma, Tau.gamma) } for (k in 1:N.err) { tau.err[k] ~ dgamma(Err.gamma, Err.gamma) } }