F.expand.plus.counts: F.expand.plus.counts

F.expand.plus.countsR Documentation

F.expand.plus.counts

Description

Expand a catch data frame to account for plus counts.

Usage

F.expand.plus.counts(catch)

Arguments

catch

A data frame containing missing data, i.e., values of "Unassigned", for variables FinalRun and/or lifeStage.

Details

Data frame catch contains records with missing data for one or both of variables FinalRun and lifeStage. In these variables, these records have a value of "Unassigned". Additionally, variable Unmarked quantifies the number of fish whose run and/or life stage is unknown. Together, these two variables identify the count and type of fish not measured during sampling.

Accurate estimation of passage requires the use of all fish in a catch. Sometimes however, catch can number in the thousands. Practically, these large numbers of fish cannot be individually examined to determine life stage and run. To quantify the underlying proportions of life stage and run on the catch as a whole, a random selection is drawn. From this random selection, the proportions of individual life stages and runs are quantified via observation. Plus counts result from applying the proportions of life stage and run obtained via sampling to the unsampled fish.

Sometimes, when examining an individual fish for life stage and run, only one attribute of the two is recorded. Thus, following sampling and examination, a caught fish falls into one of four separate scenarios:

  1. both life stage and run are recorded;

  2. life stage only is missing, but run is recorded;

  3. run only is missing, but life stage is recorded;

  4. both life stage and run are not recorded.

The first three scenarios result from a fish being randomly sampled, while the fourth results from a fish not being a part of the sample.

Function F.assign.1dim assigns missing life stage when run is recorded. The same function does the same when run is missing but life stage is recorded. Function F.assign.2dim assigns both missing life stage and run. Thus, function F.assign.1dim is the workhorse function for cases 2 and and 3, while F.assign.2dim is the same for case 4. Case 1 requires no plus counting, since life stage and run are known. Function F.expand.plus.counts calls each of these functions in turn, with each of the one-dimensional calls performed first via F.assign.1dim followed by one call to F.assign.2dim.

The plus-count algorithm assumes that all unsuccessful or non-fishing visits have been removed from data frame catch prior to implementation. Variable Unmarked identifies each of these; a 0 indicates an unsuccessful visit, while missing corresponds to non-fishing.

Value

A data frame with fish tallied via variable Unmarked, whose FinalRun and/or lifeStage was recorded as "Unassigned", reassigned to a valid run and/or life stage observed in the data.

Author(s)

WEST Inc.

See Also

F.assign.1dim, F.assign.2dim

Examples

## Not run: 
#   ---- Expand unassigned run and life stage fish via the proportions
#   ---- observed in a random selection, per trapping instance.  
newCatch <- F.expand.plus.counts(catch)

## End(Not run)

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