F.run.passage: F.run.passage - Estimate passage of all fish.

F.run.passageR Documentation

F.run.passage - Estimate passage of all fish.

Description

Estimate passage by run over all life stages within a date range.

Usage

F.run.passage(
  site,
  taxon,
  min.date,
  max.date,
  by,
  output.file,
  ci = TRUE,
  enhmodel = TRUE
)

Arguments

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 161980; i.e., Chinook Salmon.

min.date

The start date for data to include. This is a text string in the format %Y-%m-%d, or YYYY-MM-DD.

max.date

The end date for data to include. Same format as min.date.

by

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

output.file

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

ci

A logical indicating if 95% bootstrapped confidence intervals should be estimated along with passage estimates.. Default is TRUE.

enhmodel

A logical indicating if enhanced efficiency models should be used to estimate trap efficiencies. Default is TRUE.

run

The text seasonal identifier. This is a one of "Spring", "Fall", "Late Fall", or "Winter".

Details

Function F.run.passage is the main workhorse function for estimating passage with respect to each of run and life stage. As such, it calls other functions, some of which query raw data from the Access database.

Generally, queries against a database have two parts. The first involves a query for efficiency trial data, generally called "release" data. These queries are performed by function F.get.release.data. The second part involves queries of raw catch, which are performed by function F.get.catch.data.

Once catch data are obtained, fish are partitioned as to whether or not they were assigned and caught during a half-cone operation. Function F.est.passage wraps the functions that conduct the actual passage estimation, which involves statistical fits of each of catch and efficiency over time.

All calls to function F.run.passage result in daily passage estimates (in the "baseTable.csv" file). Courser temporal estimates can be obtained by specifying the value of by. Regardless of by, estimates are summarized by year. Function runs with by specified as year output only one set of annual estimates.

The difference between the specified max.date and min.date must be less than or equal to 366 days, as calculated via function difftime.

Selection of week for input variable by results in weeks displayed as customized Julian weeks, where weeks number 1-53. The specific mapping of days to weeks can be found within the "Dates" table of any associated Access database.

Value

A data frame containing the final passage estimates.

Files Created

This routine produces the following files in the 'outputs' directory of the RST package:

  • File <id>_<site>_<date>_<run>_passage_table.csv: A csv table of passage estimates over the specified date range. This file contains auxiliary information on mean fork length, sd of fork length, fishing length, the efficiency model used, and number of traps operating. If called for, this file contains daily confidence intervals surrounding estimated passage.

  • File <id>_<site>_<date>_<run>_masterCatch.csv: A csv of daily assigned catch, unassigned catch, imputed catch, and total catch. All catch numbers in this file are un-inflated by efficiency.

  • File <id>_<site>_<date>_<run>_baseTable.csv: A csv containing raw catch, imputed catch, total estimated catch, estimated efficiency and passage summarized by the temporal unit specified via by. Usually, this file contains one row per batch day.

  • File <id>_<site>_<date>_<run>_catch.png: A png of catch by time, for all traps. This graph shows raw (un-inflated) catch, which days have some imputed catch, and the smoothed catch model used for imputation.

  • File <id>_<site>_<date>_<run>_eff.png: A png of daily efficiency estimates.

  • File <id>_<site>_<date>_<run>_passage.png: A png containing a bar chart of passage estimates over the time period for time units specified in by. This graph contains inflated passage estimates (usually by day), the proportion of each day's estimate that has been imputed, and total passage (sum of all bar heights).

See Also

F.get.release.data, F.get.catch.data

Examples

 
## Not run: 
#   ---- Estimate passage on the American for the Fall run.
site <- 6000
taxon <- 161980
min.date <- "2010-12-07"
max.date <- "2011-06-02"
by <- "day"
output.file <- "Feather"
ci <- TRUE

## End(Not run)

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