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.
Usage
aggr_data(Y, W = NULL, X = NULL)
Value
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
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
# case without covariatesY = 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 covariatesW = c(1,1,2); X = as.matrix(c(0,0,2))
aggr_data(Y,W,X)