APPENDIX 1. Supporting online material (code for population model for WinBugs)

Appendix 1. Code for population model for WinBugs. The data used to model the effectiveness of tunnels for Burramys parvus are available from Dean Heinze upon request.

model
{
tau[1] <- 1 / (SE[1] * SE[1])
# precision of the estimate in year 1
# precision = 1/variance

A[1] ~ dnorm(F[1], tau[1]) # initial population size

for (i in 2:22) # for each subsequent year
{
F[i] ~ dnorm(A[i], tau[i])
# estimate population size deviates from actual

tau[i] <- 1/(SE[i]*SE[i])
# precision of estimate

A[i] ~ dpois(pred[i])
# actual population size drawn from Poisson

pred[i] <- A[i-1] * exp(a + bF*A[i-1] + bS*SR[i-1] + ann[i]) # Ricker model

ann[i] ~ dnorm(0, t)
# normal deviate representing environmental variation
}

ev <- 1/sqrt(t)
# standard deviation for environmental variation

# vague priors
t ~ dgamma(0.001, 0.001) # precision of env. variation
a ~ dnorm(0, 1.0E-6) # intercept of Ricker model
bF ~ dnorm(0, 1.0E-6) # effect of density dependence
bS ~ dunif(0, 1) # effect of sex ratio
}
ADD DATA HERE
END