Learn R Programming

Rcapture (version 1.1)

periodhist: Capture Histories Between Primary Sampling Periods

Description

This function produces the matrix of capture histories between primary sampling periods from a complete matrix of capture histories for a robust design.

Usage

periodhist(X, dfreq=FALSE, vt)

Arguments

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 i
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$).

Value

  • 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.

Details

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.

References

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/

See Also

openp

Examples

Run this code
data(mvole)
mvole.op<-periodhist(mvole,vt=rep(5,6))
openp(mvole.op, dfreq=TRUE)

Run the code above in your browser using DataLab