periodhist | R Documentation |
This function produces a reduced matrix of capture histories from a complete one by merging together some capture occasions.
It can also be used to change the format of a capture-recapture data set with complete capture histories: it transforms a data set with one row per captured unit to a data set with one row per capture history followed by its frequency.
periodhist(X, dfreq=FALSE, vt, drop=TRUE)
X |
The matrix of the observed capture histories (see |
dfreq |
A logical. By default FALSE, which means that |
vt |
A vector containing the numbers of capture occasions for each pooled capture occasions. The length of this vector equals the number of capture occasions in the reduced matrix (noted I). |
drop |
A logical, by default TRUE, meaning that in the output matrix the unobserved
capture histories (frequency of 0) are omitted. To keep them,
|
This function is useful when using an open population model to analyze a robust design data set. It can be used to reduce the data set to one observation per primary period. A one represents a unit caught at least once during the period and a zero a unit never caught.
It is also useful for experiments with a large number of capture occasions but a limited number of catches,
especially when there is no capture on some occasions. In such cases, one can pool together some capture occasions
with the periodhist
function.
If a data matrix produced by the periodhist
function is given as an argument to a Rcapture function,
the dfreq
argument must be set to TRUE
.
A 2^I-1 by I+1 matrix of all the pooled capture histories,
with their observed frequencies. If drop=TRUE
(the default), the number of rows
of this matrix is in fact 2^I-1 minus the number of unobserved capture histories.
Louis-Paul Rivest Louis-Paul.Rivest@mat.ulaval.ca and Sophie Baillargeon
Baillargeon, S. and Rivest, L.P. (2007) Rcapture: Loglinear models for capture-recapture in R. Journal of Statistical Software, 19(5), doi: 10.18637/jss.v019.i05.
openp
# mvole data set aggregated per primary period mvole.op <- periodhist(mvole, vt = rep(5, 6)) openp(mvole.op, dfreq = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.