aggr_data {LCCR} | R Documentation |
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)
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 |
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 |
Author(s)
Francesco Bartolucci, Antonio Forcina
See Also
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)
[Package LCCR version 1.3 Index]