periodhist {Rcapture} | R Documentation |
This function produces the matrix of capture histories between primary sampling periods from a complete matrix of capture histories for a robust design.
periodhist(X, dfreq=FALSE, vt)
X |
The table of the observed capture histories in one of the two accepted formats. In the default format, it has one row per unit captured in the experiment and sum(vt) columns. In the alternative format, it contains one row per capture history followed by its frequency. In that case, X has sum(vt)+1 columns. The first sum(vt) columns of X , identifying the capture histories, must contain only zeros and ones. The number one indicates a capture. |
dfreq |
This argument specifies the format of the data matrix X . By default, it is set to FALSE, which means that X has one row per unit. If it is set to TRUE, then the matrix X contains frequencies in its last column. |
vt |
A vector containing the numbers of capture occasions for each primary sampling period of a robust design. The length of this vector equals the number of primary sampling periods (noted I). |
This function is useful when using an open population model to analyse a robust design data set. It reduces the data set to one observation per primary period. The observation is one for a unit caught at least once during the period and zero for a unit never caught. If a data matrix produced by the periodhist
function is given in argument to an openp
function, the dfreq
argument must be set to TRUE.
A 2^I-1 by I+1 matrix of all the possible between periods capture histories, with their observed frequencies. This data matrix has the alternative format.
Sophie Baillargeon Sophie.Baillargeon@mat.ulaval.ca and
Louis-Paul Rivest Louis-Paul.Rivest@mat.ulaval.ca
Baillargeon, S. and Rivest, L.P. (2007). Rcapture: Loglinear models for capture-recapture in R. Journal of Statistical Software, 19(5), http://www.jstatsoft.org/
data(mvole) mvole.op<-periodhist(mvole,vt=rep(5,6)) openp(mvole.op, dfreq=TRUE)