LP_TL_fit {Petersen} | R Documentation |
Fit a Lincoln-Petersen Model with Tag Loss using conditional likelihood
Description
This will take a data frame of capture histories, frequencies, and additional covariates (e.g., strata and/or continuous covariates) and the model for p1 and the tag retention probabilities and will use conditional likelihood (conditional on capture at time 2) to fit the model. The population abundance is estimated using a Horvitz-Thompson type estimator and the user can request abundance estimates for sub-sets of the population. Refer to references and appendices in vignettes for more details.
Usage
LP_TL_fit(
data,
dt_type = NULL,
p_model,
rho_model,
all_beta.start = NULL,
trace = FALSE
)
Arguments
data |
Data frame containing the variables:
plus any other covariates (e.g. discrete strata and/or continuous covariates) to be used in the model fitting. |
dt_type |
Double Tag type. Valid values are
|
p_model |
Model for the captured probabilities. This can reference
other variables in the data frame, plus a special reserved term For some models (e.g., tag loss models), the |
rho_model |
Model for retention probabilities |
all_beta.start |
Initial values for call to optimization routine for the beta parameters (on the logit scale). The values will be replicated to match the number of initial beta parameters needed. Some care is needed here since the parameter order are for the p1 probabilities and then for the rho probabilities |
trace |
If trace flag is set in call when estimating functions |
Details
The frequency variable (freq
in the data
argument) is the number of animals with the corresponding capture history.
Capture histories (cap_hist
in the data
argument) are character values of length 4.
If the tag loss model is two indistinguishable tags (dt_type="notD"
), then valid capture histories are:
-
1100 Animals double tagged but never seen again.
-
111X Animals double tagged, but only 1 tag was present when animal recaptured at second event.
-
1111 Animals double tagged and both tags present when animal recaptured at second event.
-
1000 Animals single tagged and never seen again.
-
0100 Animals single tagged and never seen again.
-
1010 Animals single tagged and recaptured with the single tag.
-
0101 Animals single tagged and recaptured with the single tag.
-
0010 Animals APPARENTLY captured for the first time at event 2. This includes animals that are newly captured, plus fish that were tagged and lost all their tags, and were captured again
If the tag loss model is two distinguishable tags (dt_type="twoD"
), then valid capture histories are the same
as above except the history 111X
is replaced by:
-
1110 Animals double tagged, but only the first of the double tags applied was present when animal recaptured at event 2,
-
1101 Animals double tagged, but only the second of the double tags applied was present when animal recaptured at event 2.
If the second tag is a permanent batch mark (dt_type="t2perm"
), then valid capture histories are:
-
1P00 Animals double tagged but never seen again.
-
1P0P Animals double tagged,but non-permanent tag missing when animal recaptured at second event.
-
1P1P Animals double tagged and both tags present when animal recaptured at second event.
-
1000 Animals single tagged and never seen again.
-
0P00 Animals single tagged with a permanent batch mark only and never seen again.
-
1010 Animals single tagged and recaptured with the single tag.
-
0P0P Animals single tagged with the permanent batch mark and recaptured with the permanent tag.
-
0010 Animals APPARENTLY captured for the first time at event 2. This includes animals that are newly captured, plus fish that were tagged and lost all their tags, and were captured again
Value
An list object of class LP_TL_fit-notD or LP_TL_fit-twoD, or LP_TL_fit-t2per (depending on the type of double tag) with abundance estimates and other information with the following elements
-
summary A data frame with the model for the capture probabilities, and tag retention probabilities; the conditional log-likelihood; the number of parameters; the number of parameters, and method used to fit the model
-
data A data frame with the raw data used in the fit
-
fit Results of the fit including the estimates, SE, vcov, etc.
-
datetime Date and time the fit was done
After the fit is complete, use the LP_TL_est() function to obtain estimates.
Author(s)
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
References
Seber, G. A. F., and R. Felton. (1981). Tag Loss and the Petersen Mark-Recapture Experiment. Biometrika 68, 211–19.
Hyun, S.-Y., Reynolds.J.H., and Galbreath, P.F. (2012). Accounting for Tag Loss and Its Uncertainty in a Mark–Recapture Study with a Mixture of Single and Double Tags. Transactions of the American Fisheries Society, 141, 11-25 http://dx.doi.org/10.1080/00028487.2011.639263
Examples
data(data_kokanee_tagloss)
fit <- Petersen::LP_TL_fit(data=data_kokanee_tagloss, p_model=~1, rho_model=~1, dt_type="notD")
fit$summary
est <- Petersen::LP_TL_est(fit, N_hat=~1)
est$summary