chapter19

The JAGS code for the spatial mark-resight model with known number of marks and telemetry data is incorrect. It should read:

[… parts of model code omitted…]

for(i in 1:m) {

sm[i,1] ~ dunif(xlim[1], xlim[2])

sm[i,2] ~ dunif(ylim[1], ylim[2])

for(j in 1:J) {

distm[i,j] <- sqrt((sm[i,1]-X[j,1])^2 + (sm[i,2]-X[j,2])^2)

lambdam[i,j] <- lam0*exp(-distm[i,j]^2/(2*sigma^2))

y[i,j]~dpois(lambdam[i,j]*K)

}

}

#telemetry model

for (r in 1:nlocs){

locs[r,1]~dnorm(sm[ind[r],1], 1/(sigma^2))

locs[r,2]~dnorm(sm[ind[r],2], 1/(sigma^2))

}

[… parts of model code omitted…]

The object ‘nlocs’ is the total number of telemetry locations across all marked individuals. The object ‘ind’ is a vector of length nlocs with an individual identifier taking the values 1,2,…m. So if, say, the locations of individual 1 are contained in the first 10 rows of ‘locs’, the first 10 values in ‘ind’ would be ‘1’; and if the locations of individual 2 are the following 15 rows, values 11 to 25 in ‘ind’ would be ‘2’, and so on. Both ‘nlocs’ and ‘ind’ have to be passed to JAGS as data. The previously listed objects ‘off1’ and ‘off2’ are not necessary.