F.est.passage: F.est.passage

F.est.passageR Documentation

F.est.passage

Description

Compute passage estimates, given catch and efficiency trial data.

Usage

F.est.passage(catch.df, release.df, summarize.by, file.root, ci)

Arguments

catch.df

A data frame with one row per trapvisitID for a particular FinalRun and lifeStage.

release.df

A data frame resulting from a call to function F.get.release.data. Contains efficiency data.

summarize.by

A text string indicating the temporal unit over which daily estimated catch is to be summarized. Can be one of "day", "week", "month", or "year".

file.root

A text string indicating a prefix to append to all output.

ci

A logical indicating if bootstrapped confidence intervals should be estimated along with passage estimates. The default is 95%, although levels other than 95% can be set in function F.bootstrap.passage.

Details

Two main steps comprise the estimation of passage. The first fetches and formats all the necessary data. The second performs statistical analysis on those processed data. Function F.est.passage is the workhorse function for all statistical analysis associated with the estimation of passage. As such, it calls functions responsible for catch modeling (F.est.catch), efficiency modeling (F.est.efficiency), and the bootstrapping of passage (F.bootstrap.passage).

Function F.est.passage brings together catch and efficiency data. Called the "grand merge," resulting data frame grand.df forms the basis of all passage estimation. Merging takes places on unique combinations of trapPositionID and batchDate. Trap matches respect decimal suffixes appended due to gaps in fishing. See the section Fishing Gaps under the Structured Query Language (SQL) header in F.sqlFile.

In processing prior to the creation of the grand.df, the dates outside the first and last date of valid fishing are dropped from each trap. In reality however, the season for each trap is identified as non-missing catch. In other words, the grand merge inserts every date for all traps because the underlying efficiency data frame has all dates. For those dates for which a trap was not fishing, the resulting catch (and thus passage) is essentially considered zero.

Function F.bootstrap.passage summarizes the daily passage estimates housed in grand.df to the temporal units specified via summarize.by, and then compiles all statistics for eventual reporting. Statistics include weighted mean forklength, standard deviation of forklength, and fish counts N.

Function calls resulting in non-zero catch, but zero efficiency, due to no valid efficiency trials, result in warnings of zero efficiency. The function will continue, but all passage estimates will be NA.

Value

A data frame containing daily passage estimates, corrected for times not fishing, along with associated standard errors.

Fish Accounting

Passage estimation results in the partitioning of fish into different groups. For example, a fish could be assigned/not assigned, measured/not measured, half-cone/full-cone, plus-count, imputed, or inflated. Function F.est.passage organizes all of these different types of fish following their initial partitioning in function F.get.catch.data. Fish accounting on a daily basis ensures that the counts of these different types of fish collapse back to their original totals following analytic processing. Said another way, fish accounting ensures that no fish are mysteriously gained or lost during the passage estimation process.

Three types of daily checks are performed for each individual trap, with the function stopping in any case for which accounting fails.

  1. totalCatch = assignedCatch + unassignedCatch + imputedCatch

  2. inflatedCatch = assignedCatch + unassignedCatch

  3. totalCatch = inflatedCatch + imputedCatch

Author(s)

WEST Inc.

See Also

F.get.release.data, F.bootstrap.passage, F.est.catch, F.est.efficiency

Examples

## Not run: 
#   ---- Estimate passage based on a given set of 
#   ---- catch and release dataframes, over weeks.
thePassage <- F.est.passage(catch.df, release.df, "week", "myFileRoot", ci=TRUE )

## End(Not run)

tmcd82070/CAMP_RST documentation built on April 6, 2022, 12:07 a.m.