lir_nonparametric_estimation: A nonparametric estimator for lagged identification rate

View source: R/lir_nonparametric_estimation.R

lir_nonparametric_estimationR Documentation

A nonparametric estimator for lagged identification rate

Description

A nonparametric estimator for lagged identification rate

Usage

lir_nonparametric_estimation(X, n, tp)

Arguments

X

A list or matrix containing the identities of individuals identified during each sampling period

n

A vector or a positive integer, representing the number of individuals identified in each sampling period. It indicates the same number of individuals identified in all sampling periods if a positive integer.

tp

A set of observation time

Details

The lagged identification rate R(\tau) is the probability that an individual in the study area is identified now and is reidentified after a time lag of \tau. A nonparametric estimator of R(\tau) was given by Whitehead (2007):

\hat{R}(\tau)=\frac{\sum_{i,j} \{m_{t_i,t_j}|\tau_{ij}=\tau\}}{\sum_{i,j}\{n_i*n_j|\tau_{ij}=\tau\}},

where where m_{t_i,t_j} is the number of individuals identified at both time t_i and t_j, and n_{t_i} represents the number of individuals identified at time t_i.

Value

A list with the following elements:

tau

a set of time lags

R_tau

A nonparametric estimator of \hat{R}(\tau) was given by Whitehead (2007)

R_m

\sum_{i,j} \{m_{t_i,t_j}|\tau_{ij}=\tau\}, with \tau_{ij}=|t_i-t_j|

R_n

\sum_{i,j} \{n_i*n_j|\tau_{ij}=\tau\}, with \tau_{ij}=|t_i-t_j|

mij

number of individuals identified at both time t_i and t_j

nij

n_i*n_j

tauij

\tau_{ij}=|t_i-t_j|

Examples

# Example
tp <- c(1:5, 51:55, 101:105, 501:505, 601:605)
N <- 100; n <- 10
X <- list()
for (i in tp){
X[[i]] <- sample(1:N, n)
}

res <- lir_nonparametric_estimation(X, n, tp)
res$R_tau; res$tau



Alexhaoge/rCLIFII documentation built on Sept. 28, 2023, 11:23 p.m.