assignLSCompare: assignLSCompare

View source: R/assignLSCompare.R

assignLSCompareR Documentation

assignLSCompare

Description

Compares the morphometric life stage assignment to the analytical life stage assignment. The comparison is presented through both a confusion matrix and a plot.

Usage

assignLSCompare(
  Data,
  muLIST,
  sigmaLIST,
  SAVE = TRUE,
  output.file = output.file
)

Arguments

Data

A data.frame of the catch data with both the morphometric and analytical life stage assignments.

muLIST

A list of matrices. The names of the elements in the list need to correspond to the final run names in the catch data. The columns of each matrix correspond to the mean vector from the mixture distribution from assignLifeStage, the row names need to be the variable names in Data that were used in the mixture distribution.

sigmaLIST

A list of 3d arrays. The names of the elements in the list need to correspond to the final run names in the catch data. The third dimension indexes the different life stage groups, for which a matrix of the variance covariance exists, from the mixture distribution from assignLifeStage. The first and second dimension names need to be the same and correspond to the variable names in Data that were used in the mixture distribution.

SAVE

Default is TRUE, a plot (PDF file) and confusion matrix (CSV file) for each final run is saved in the output.file location. If FALSE each plot is displayed in a new R plot window. In either case the confusion matrix is printed to the R console.

output.file

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

Details

This function is only intended to be called within the assignLifeStage function.

The confusion matrix's rows correspond to the morphometric life stage assignment (labeled bioLS) and the columns the analytical life stage assignment. The cells of the confusion matrix present the number of fish.

The plot symbols are circle on the horizontal axis and fish fork length on the vertical axis, the color of the symbol refers to the analytical assignment and the symbol type indicated the morphometic assignment. The colors are red (Small), green (Medium), blue (Large), and orange (All). The circle (Fry), triangle (Parr), and plus sign (Smolt). For example if a fish was morphometrically assigned as a Parr and analytically assigned as a Large the plot symbol would be a blue triangle.

Value

NA

Author(s)

Jared Studyvin WEST Inc.

See Also

assignLifeStage

Examples

## Not run: 
#insert examples


## End(Not run)

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