F.est.passage | R Documentation |
Compute passage estimates, given catch and efficiency trial data.
F.est.passage(catch.df, release.df, summarize.by, file.root, ci)
catch.df |
A data frame with one row per |
release.df |
A data frame resulting from a call to function
|
summarize.by |
A text string indicating the temporal unit over which
daily estimated catch is to be summarized. Can be one of |
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 |
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
.
A data frame containing daily passage estimates, corrected for times not fishing, along with associated standard errors.
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.
totalCatch = assignedCatch + unassignedCatch + imputedCatch
inflatedCatch = assignedCatch + unassignedCatch
totalCatch = inflatedCatch + imputedCatch
WEST Inc.
F.get.release.data
, F.bootstrap.passage
,
F.est.catch
, F.est.efficiency
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.