ch2marray {AHMbook} | R Documentation |
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)
Arguments
CH |
An individuals x time matrix of capture records, 1 if captured, 0 otherwise, no missing values. |
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.
Author(s)
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
Examples
data(willowWarbler)
ch <- as.matrix(willowWarbler$birds[ , 1:11]) # extract capture-histories.
dim(ch)
ch2marray(ch)
[Package AHMbook version 0.2.9 Index]