marrayDead: Converts dead-recovery capture histories to an m-array
Description
Converts dead-recovery capture histories to an m-array.
Usage
marrayDead(MR, freq = 1, groups = NULL)
Value
An m-array, a (years-1) x years x groups array, where element [i, j, g] contains the number of individuals in group g marked in year i and recovered in year j+1. The last column contains the number of individuals marked in year i and never recovered. If no groups are specified, this will be a (years-1) x years matrix.
Arguments
MR
an individuals x time matrix with 1 denoting either the time of marking or the time of recovery; otherwise 0.
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 ch refers to. Ignored if freq is a matrix with > 1 column.
Author
Michael Schaub
Details
The argument MR can be a matrix of unique capture histories accompanied by a vector or matrix, freq, specifying the number of animals with each capture history. For other formats, see ch2matrix.
References
Schaub, M., Kéry, M. (2022) Integrated Population Models, Academic Press, chapter 12.4.3.
data(peregrine)
str(peregrine$recoveries) # 1810 animals x 43 yearsdr <- cleanCH(peregrine$recoveries[, 29:43]) # Use last 15 years of datamarrayDead(dr)