#' Gear Efficiency Correction for Deepwater Electrofisher
#'
#' Use the relation between larval lamprey length and probability of catch
#' in the deepwater electrofisher to derive a gear efficiency correction factor.
#' @param llengthmm
#' A numeric vector of lengths (in mm) of live larval lampreys.
#' @details
#' Lake-stream IDs are combination of lake ID and stream ID
#' e.g., 1.064 = lake ID + (stream ID)/1000.
#'
#' For both estimate files (csvNew and csvOld), there should be no missing
#' values in \code{year}, \code{lake}, or \code{lscode}.
#' Both files may contain variables other than those required.
#' Those with the same name as variables in \code{streamInfo} will be
#' replaced. Others will be kept.
#' @return
#' A numeric vector equivalent to the inverse probability of capture,
#' \code{p}, at length \code{llengthmm.},
#' \code{logit(p) = 1.732 - 0.0229*llengthmm}. This correction factor can
#' then be multiplied by the number of lamprey of that size captured
#' to estimate the catch adjusted for gear efficiency.
#' @export
#' @references
#' Robinson, JM, MJ Wilberg, JV Adams, and ML Jones. 2014.
#' Comparing methods for estimating larval sea lamprey (\emph{Petromyzon marinus})
#' density in the St. Marys River for the purposes of control.
#' Journal of Great Lakes Research 40(3):739-747.
#' \href{https://doi.org/10.1016/j.jglr.2014.05.012}{[link]}
#' @examples
#' catch <- 1:6
#' lenmm <- seq(80, 180, 20)
#' adjcatch <- catch*DWEFgec(lenmm)
#' cbind(catch, lenmm, adjcatch)
#'
DWEFgec <- function(llengthmm) {
if(!is.numeric(llengthmm)) stop("llengthmm must be a numeric vector")
1 + exp(0.0229 * llengthmm - 1.732)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.