aggr_data function

Aggregate capture-recapture data

Aggregate capture-recapture data

Given a matrix of individual capture configurations, and the corresponding matrix and array of covariates (affecting the class weights and the conditional capture probabilities given the latent class), the function aggregates data, providing a stratified capture-recapture format.

aggr_data(Y, W = NULL, X = NULL)

Arguments

  • Y: matrix of frequencies of capture configurations
  • W: matrix of covariates affecting the class weights
  • X: array of covariates affecting the conditional capture probabilities

Returns

  • Ya: matrix of aggregated frequencies of capture configurations

  • Wa: matrix of aggregated covariates affecting the class weights

  • Xa: array of aggregated covariates affecting the conditional capture probabilities

Author(s)

Francesco Bartolucci, Antonio Forcina

See Also

freq_data

Examples

# case without covariates Y = rbind(c(0,1,0,0,0,0,0,0),c(0,0,0,1,0,0,0,0),c(0,0,0,0,0,0,1,0)) aggr_data(Y) # case with covariates W = c(1,1,2); X = as.matrix(c(0,0,2)) aggr_data(Y,W,X)
  • Maintainer: Francesco Bartolucci
  • License: GPL (>= 2)
  • Last published: 2025-03-22

Useful links