View source: R/ch2marray_AHM2_3-4-1.R
ch2marray | R Documentation |
Converts capture-histories to an m-array for use in a Cormack-Jolly-Seber (CJS) model.
ch2marray(CH)
CH |
An individuals x time matrix of capture records, 1 if captured, 0 otherwise, no missing values. |
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.
Marc Kéry & Andy Royle, modified from code in Kéry and Schaub (2012).
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
data(willowWarbler)
ch <- as.matrix(willowWarbler$birds[ , 1:11]) # extract capture-histories.
dim(ch)
ch2marray(ch)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.