ch2marray: Converts capture-histories to an m-array
Description
Converts capture-histories to an m-array for use in a Cormack-Jolly-Seber (CJS) model.
Usage
ch2marray(CH)
Value
An m-array, a (years-1) x years matrix, where element [i, j] contains the number of individuals released in year i and recaptured in year j+1 (by definition no recaptures can occur in year 1). The last column contains the number of individuals released in year i and never recaptured.
Arguments
CH
An individuals x time matrix of capture records, 1 if captured, 0 otherwise, no missing values.
Author
Marc Kéry & Andy Royle, modified from code in Kéry and Schaub (2012).
References
Kéry and Schaub (2012) Bayesian population analysis using WinBUGS - a hierarchical perspective, Academic Press.
Kéry, M. & Royle, J.A. (2021) Applied Hierarchical Modeling in Ecology AHM2 - 3.4.1