marrayAge | R Documentation |
Converts single-state capture-recapture data to age-dependent m-arrays.
marrayAge(ch, age = 1, mAge = 1, freq = 1, groups = NULL)
ch |
an individuals x time matrix with capture histories (0: not captured; 1: captured). See Details. |
age |
vector with the age class at first capture for each individual, or a scalar that will be used for all individuals. |
mAge |
maximum number of age classes for which m-arrays are constructed; ignored if |
freq |
a vector with the number of animals with each capture history, or a matrix with a column for each group. If a single value is supplied, it will be used for all rows in the capture history; the default is to assume each row corresponds to a single animal. |
groups |
a factor (or a vector that can be coerced to a factor) which identifies the group that each row of |
The argument ch
can be a matrix of unique capture histories accompanied by a vector or matrix, freq
, specifying the number of animals with each capture history. Trap losses can be indicated either by negative values for freq
, or by filling the row with NA after the last capture. For other formats, see ch2matrix
.
A 4-d array, (years-1) x years x age classes x groups, where element [i, j, k, g] contains the number of individuals in group g of age class k released in year i and recaptured in year j+1 (by definition no recaptures can occur in year 1). If no groups are specified, this will be a 3-d array, (years-1) x years x age classes. The last column contains the number of individuals released in year i and never recaptured.
Michael Schaub
Schaub, M., Kéry, M. (2022) Integrated Population Models, Academic Press, section 4.5.1.2.
data(woodchat5)
dim(woodchat5$ch) # 1902 animals x 20 years
marrayAge(ch=woodchat5$ch, age=woodchat5$age, mAge=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.