Learn R Programming

LCCR (version 2.0.1)

aggr_data: Aggregate capture-recapture data

Description

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

Author

Francesco Bartolucci, Antonio Forcina

See Also

freq_data

Examples

Run this code
# 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)

Run the code above in your browser using DataLab