Hi all,
I’m working on sooty grouse abundance trend estimation using a binomial N-mixture model in JAGS, following the approach in Kéry et al. 2009. My model includes site random effects on abundance and observer random effects on detection, and I’ve been testing different ways to calculate the trend line (based on growth rate r) to plot alongside yearly mean abundance (Nmn[k]) and raw abundance counts.
Issues I'm facing:
Likelihood model in JAGS:
# Likelihood
for (k in 1:nyear) {
for (i in 1:nsite) {
log(lambda[i, k]) <- loglam0 + r * (k - nyear/2) + eta.site[i]
N[i, k] ~ dpois(lambda[i, k])
for (t in 1:nrep) {
logit(p[i, t, k]) <- logitp0 + bpts * PTS[i, t, k] + teta.p[i, t, k]
C[i, t, k] ~ dbin(p[i, t, k], N[i, k]) # Observation process
}
}
}
# Derived parameters: Mean and total abundance over time
for (k in 1:nyear) {
Nmn[k] <- mean(N[1:nsite, k]) # Mean abundance per year
Npop[k] <- sum(N[1:nsite, k]) # Total abundance per year
}
Trend line derivation in JAGS:
for (k in 1:nyear) {
# Growth rate model
log(lambda_trend[k]) <- loglam0 + r * (k - nyear/2)
# Including sit random effects
log(lambda_trend_site[k]) <- mean(log(lambda[1:nsite, k]))
# Compute year-specific detection probability
mean_p[k] <- mean(p[,,k])
# Correcting for detection probability
lambda_trend_corrected[k] <- lambda_trend[k] / mean_p[k]
lambda_trend_site_corrected[k] <- lambda_trend_site[k] / mean_p[k]
}
Questions:
Any insights or suggestions would be greatly appreciated. Thanks in advance for your help!
Best,
Sarah