Package: Petersen 2024.6.1

Carl Schwarz

Petersen: Estimators for Two-Sample Capture-Recapture Studies

A comprehensive implementation of Petersen-type estimators and its many variants for two-sample capture-recapture studies. A conditional likelihood approach is used that allows for tag loss; non reporting of tags; reward tags; categorical, geographical and temporal stratification; partial stratification; reverse capture-recapture; and continuous variables in modeling the probability of capture. Many examples from fisheries management are presented.

Authors:Carl Schwarz [aut, cre]

Petersen_2024.6.1.tar.gz
Petersen_2024.6.1.tar.gz(r-4.5-noble)Petersen_2024.6.1.tar.gz(r-4.4-noble)
Petersen_2024.6.1.tgz(r-4.4-emscripten)Petersen_2024.6.1.tgz(r-4.3-emscripten)
Petersen.pdf |Petersen.html
Petersen/json (API)
NEWS

# Install 'Petersen' in R:
install.packages('Petersen', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/cschwarz-stat-sfu-ca/petersen/issues

Uses libs:
  • jags– Just Another Gibbs Sampler for Bayesian MCMC
  • c++– GNU Standard C++ Library v3
Datasets:

jagscpp

2.78 score 12 scripts 172 downloads 26 exports 74 dependencies

Last updated 7 months agofrom:6f4541c371. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 28 2024
R-4.5-linuxOKDec 28 2024

Exports:cap_hist_to_n_m_uexpitfit_classeslogitLP_AICcLP_BTSPAS_estLP_BTSPAS_fit_DiagLP_BTSPAS_fit_NonDiagLP_CL_fitLP_estLP_est_adjustLP_fitLP_for_rev_fitLP_IS_estLP_IS_fitLP_IS_printLP_modavgLP_SPAS_estLP_SPAS_fitLP_summary_statsLP_test_equal_mfLP_test_equal_recapLP_TL_estLP_TL_fitLP_TL_simulatesplit_cap_hist

Dependencies:abindactuarAICcmodavgbbmlebdsmatrixbootBTSPASclicodacolorspacecpp11data.tabledplyrexpintexpmfansifarverformula.toolsgenericsggforceggplot2gluegridExtragtableisobandlabelinglatticelifecyclelme4magrittrMASSMatrixmgcvminqamsmmunsellmvtnormnlmenloptrnumDerivoperator.toolspillarpkgconfigplyrpolyclippurrrR2jagsR2WinBUGSR6RColorBrewerRcppRcppArmadilloRcppEigenreshape2rjagsrlangscalesSPASstringistringrsurvivalsystemfontstibbletidyrtidyselectTMBtweenrunmarkedutf8vctrsVGAMviridisLitewithrxtable

PackageDocumentation

Rendered fromPackageDocumentation.Rmdusingknitr::rmarkdownon Dec 28 2024.

Last update: 2023-11-12
Started: 2023-11-12

Readme and manuals

Help Manual

Help pageTopics
Convert capture history data to n, m and u for use in BTSPAScap_hist_to_n_m_u
Estimating abundance of outgoing smolt - BTSPAS - diagonal casedata_btspas_diag1
Estimating abundance of salmon - BTSPAS - non-diagonal casedata_btspas_nondiag1
Capture-recapture on Kokanee in Metolius River with tag lossdata_kokanee_tagloss
Lower Fraser Coho for Reverse Capture-Recapture with geographic stratification.data_lfc_reverse
Capture-recapture experiment on Northern Pike in Mille Lacs, MN, in 2005.data_NorthernPike
Capture-recapture experiment on Northern Pike in Mille Lacs, MN, in 2005 with tagloss information.data_NorthernPike_tagloss
Capture-recapture experiment at Rodli Tarn.data_rodli
Simulated data for reward tags used to estimate reporting ratedata_sim_reward
Simulated data for tag loss with second permanent tag.data_sim_tagloss_t2perm
Simulated data for tag loss with 2 distinguishable tags.data_sim_tagloss_twoD
Estimating abundance of salmon - SPAS - Harrison Riverdata_spas_harrison
Walleye data with incomplete stratification with length covariatedata_wae_is_long
Walleye data with incomplete stratification with no covariates and condenseddata_wae_is_short
Yukon River data used for Reverse Capture-Recapture example.data_yukon_reverse
*LP_fit*, *LP_IS_fit*, *LP_SPAS_cit*, *CL_fit*, *LP_BTSPAS_fit_Diag*, *LP_BTSPAS_fit_NonDiag*, *LP_CL_fit* classes.fit_classes
Logit and anti-logit function.expit logit
Create an AIC table comparing multiple LP fitsLP_AICc
Extract estimates of abundance after BTSPAS fitLP_BTSPAS_est
Wrapper (*_fit) to call the Time Stratified Petersen Estimator with Diagonal Entries function in BTSPAS.LP_BTSPAS_fit_Diag
Wrapper (*_fit) to call the Time Stratified Petersen Estimator with NON-Diagonal Entries function in BTSPAS.LP_BTSPAS_fit_NonDiag
Fit the Chen-Lloyd model to estimate abundance using a non-parametric smoother for a covariatesLP_CL_fit
Estimate abundance after the LP conditional likelihood fit.LP_est
Estimate abundance after empirical adjustments for various factors.LP_est_adjust
Fit a Lincoln-Petersen Model using conditional likelihoodLP_fit
Fit a combined FORWARD and REVERSE simple Lincoln-Petersen Model using pseudo-likelihoodLP_for_rev_fit
Estimate abundance after the LP_IS conditional likelihood fit.LP_IS_est
Fit a Lincoln-Petersen Model with incomplete stratificationLP_IS_fit
Print the results from a fit a Lincoln-Petersen Model with incomplete stratificationLP_IS_print
Create an table of individual estimates and the model averaged valuesLP_modavg
Extract estimates of abundance after SPAS fitLP_SPAS_est
Fit a Stratified-Petersen SPAS model.LP_SPAS_fit
Compute summary statistics from the capture historiesLP_summary_stats
Test for equal marked fractions in LP experimentLP_test_equal_mf
Test for equal recapture probability in LP experimentLP_test_equal_recap
Estimate abundance after the LP_TL (tag loss) conditional likelihood fit.LP_TL_est
Fit a Lincoln-Petersen Model with Tag Loss using conditional likelihoodLP_TL_fit
Simulate data from a Lincoln-Petersen Model with Tag LossLP_TL_simulate
Split a vector of capture histories into a matrix with one column for each occasionsplit_cap_hist