Estimating animal abundance: open populations

Modelling Population Dynamics
Chapter 7: Survival estimation from mark-re-encounter data

Section 7.2.1 Capture-recapture data

WinBugs implementation of Cormack-Jolly-Seber model

model
{
for (i in 1:n)  # loop over individuals
    {

    # State-space model likelihood
    px[i,f[i]]

Section 7.2.4 Capture-recapture of European Dipper data

Data themselves reside in file named ed.dat

WinBUGS model (named “phitpt.bug” in subsequent R code

# State-space modelling of mark-recapture data
model

{

  for (i in 1:n)  # loop / individual

  {

    px[i,f[i]]

Finally the R code to calling R2WinBUGS

niter = 500
nburn = 50

#------------------------------#
#--- model (phi-t,p-t) --------#
#------------------------------#

# read encounter histories
setwd("appropriate for your local configuration")
data  1)
        {
       for (j in 1:(fc[i]-1))
	   {dataIV[i,j] = NA}
	}
     }

# first list of inits
init1