Description Usage Arguments Value Author(s) References
This function gets number of individuals, number of capture occasions, occasions of first capture and age from a capture-recapture dataset. Given a matrix of capture-recapture data (1 for detection, 2 for non-detection) at regular time periods, for instance years, when the first capture of an animal occurs during its birth year, at each year the age of that animal is known. Quantities nind and nyears are respectively the numbers of animals and of time units in this matrix.
1 | prep_data(mydata)
|
mydata |
a matrix of 1's and 2's for detections and non-detections |
This function returns a list with components the number of individuals, the number of capture occasions, the occasion of first capture for each individual and the age of each individual over time.
nind is the number of rows in mydata
nyears is the number of columns in mydata
first is a vector gathering for each row the rank of the first '1' denoting first detection
age is defined as follows: as the first '1' in row 'i' denotes the time of birth of the 'i'th animal, 'age[i,j]' for j in (first[i],nyears-1) is the age at time 'j'
Gilbert Marzolin, Olivier Gimenez
King R, Morgan BJT, Gimenez O and Brooks S (2009). Bayesian Analysis for Population Ecology. Chapman & Hall/CRC Interdisciplinary Statistics.
Robert CP and Casella G (2010). Introducing Monte Carlo Methods with R. Springer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.