F.passageWithLifeStageAssign | R Documentation |
Estimate annual passage / production estimates between days specified.
F.passageWithLifeStageAssign( site, taxon, min.date, max.date, output.file, ci = TRUE, autols = FALSE, nls = NULL, weightuse = NULL, enhmodel = TRUE )
site |
The identification number of the site for which estimates are required. |
taxon |
The species identifier indicating the type of fish of interest.
This is always |
min.date |
The start date for data to include. This is a text string in
the format |
max.date |
The end date for data to include. Same format as
|
output.file |
The name of the file prefix under which output is to be saved. Set to NA to plot to the Plot window. |
ci |
A logical indicating if 95% bootstrapped confidence intervals should be estimated along with passage estimates. |
autols |
Default of |
nls |
Number of life stage groups to estimate. Ignored if
|
weightuse |
A logical indicating if variable |
enhmodel |
A logical indicating if enhanced efficiency models should
be used to estimate trap efficiencies. Default is |
The date range difference specified via max.date
and
min.date
must be less than or equal to 366 days. Note that this
cutoff allows for leap-year annual estimates.
Passage requires the division of a non-zero catch by a non-zero efficiency. A non-zero catch numerator ensures that passage estimates are greater than zero, while a non-zero efficiency denominator ensures that passage estimates are less than infinity. The program exits if either of these conditions are violated.
Assuming validity, catch data are summarized via unique combinations of
trapVisitID
, FinalRun
, and lifeStage
. After
summarizing, all catch data are collapsed so as to have one line per
combination of these variables. The use of a plus-count algorithm divvies
up non-randomly selected fish into appropriate FinalRun
and
lifeStage
categories. In this way, all fish are ultimately utilized
in all pasasge estimates by life stage and run.
Observed fish are also corrected for half-cone operations, in which the
intake of fish is reduced to half of a cone's aperture being covered, so as
to reduce flow, and thus captured fish. Generally, all fish captured
during half-cone operations are multiplied by the value of the global
halfConeMulti
variable, which serves as a multiplier to correct for
fish missed. Variable halfConeMulti
is set to 2
.
The unique combinations of run and life stage in the catch data dictate the reports generated. Thus, reports spanning different time periods and sites may report different run and life stage passage combinations.
In the case when autols=TRUE
, the life stage is assigned
analytically. Note that the only numbers of groups allowed by argument
(nls
) is two
or three
. If NULL
, the function
assignLifeStage
determines the number of groups utilized.
If weightuse
is FALSE
, any recorded weight measurements are
not used in the analytical life stage assignment. If weightuse
is
NULL
, the function assignLifeStage
will determine if variable
weight
will be used or not.
A data frame containing daily passage estimates, corrected for times not fishing, along with associated standard errors.
A bar chart displaying relative proportions over both run and life stage.
For each unique combination of run and life stage containing at least one
fish, a graph png
of catch over time, a csv
of daily catch
and passage.
A graphical display of efficiency over time, for each trap, along with an
accompanying csv
tabular datasheet.
In the case when autols=TRUE
, a plot (pdf
) and a confusion
matrix (csv
) comparing the analytical and morphometric life stage
assignments.
WEST Inc.
assignLifeStage
, assignlsCompare
, F.run.passage
## Not run: # ---- For the WallaWalla workshop site <- 1000 taxon <- "161980" min.date <- "2018-01-01" max.date <- "2018-08-01" output.file <- "passageWithLifeStageAssign_Imnaha_2019-10-31_15-33-50" ci <- TRUE autols <- FALSE nls <- 1 weightuse <- TRUE enhmodel <- FALSE ans <- F.passageWithLifeStageAssign(site, taxon, min.date, max.date, output.file, ci, autols, nls, weightuse, enhmodel) # ---- Estimate passage on the American by life stage and run. site <- 57000 taxon <- 161980 min.date <- "2013-01-01" max.date <- "2013-06-01" output.file <- "American" ci <- TRUE nls <- NULL weightuse <- NULL autols <- FALSE passageWithLifeStageAssign(site,taxon,min.date,max.date,output.file,ci, weightuse,autols) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.