View source: R/lir_nonparametric_estimation.R
lir_nonparametric_estimation | R Documentation |
A nonparametric estimator for lagged identification rate
lir_nonparametric_estimation(X, n, tp)
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 |
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
.
A list with the following elements:
tau |
a set of time lags |
R_tau |
A nonparametric estimator of |
R_m |
|
R_n |
|
mij |
number of individuals identified at both time |
nij |
|
tauij |
|
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.