Package 'aLBI'

Title: Estimating Length-Based Indicators for Fish Stock
Description: Provides tools for estimating length-based indicators from length frequency data to assess fish stock status and manage fisheries sustainably. Implements methods from Cope and Punt (2009) <doi:10.1577/C08-025.1> for data-limited stock assessment and Froese (2004) <doi:10.1111/j.1467-2979.2004.00144.x> for detecting overfishing using simple indicators. Key functions include: FrequencyTable(): Calculate the frequency table from the collected and also the extract the length frequency data from the frequency table with the upper length_range. A numeric value specifying the bin width for class intervals. If not provided, the bin width is automatically calculated using Sturges (1926) <doi:10.1080/01621459.1926.10502161> formula. CalPar(): Calculates various lengths used in fish stock assessment as biological length indicators such as asymptotic length (Linf), maximum length (Lmax), length at sexual maturity (Lm), and optimal length (Lopt). FishPar(): Calculates length-based indicators (LBIs) proposed by Froese (2004) <doi:10.1111/j.1467-2979.2004.00144.x> such as the percentage of mature fish (Pmat), percentage of optimal length fish (Popt), percentage of mega spawners (Pmega), and the sum of these as Pobj. This function also estimates confidence intervals for different lengths, visualizes length frequency distributions, and provides data frames containing calculated values. FishSS(): Makes decisions based on input from Cope and Punt (2009) <doi:10.1577/C08-025.1> and parameters calculated by FishPar() (e.g., Pobj, Pmat, Popt, LM_ratio) to determine stock status as target spawning biomass (TSB40) and limit spawning biomass (LSB25). These tools support fisheries management decisions by providing robust, data-driven insights.
Authors: Ataher Ali [aut, cre], Mohammed Shahidul Alam [aut]
Maintainer: Ataher Ali <[email protected]>
License: GPL-3
Version: 0.1.7
Built: 2024-11-19 18:30:31 UTC
Source: https://github.com/ataher76/albi

Help Index


CPdata: Example dataset for aLBI package

Description

This dataset contains description of CPdata.

Usage

data(CPdata)

Format

A data frame with [number of rows] rows and 11 columns:

A

[description of column A]

B

[description of column B]

C

[description of column C]

D

[description of column D]

E

[description of column E]

F

[description of column F]

G

[description of column G]

H

[description of column H]

I

[description of column I]

J

[description of column J]

Tx

[description of column Tx]

Source

[Include the source of the data if available]

Examples

data(CPdata)
head(CPdata)

ExData: Example raw lenght dataset for aLBI package

Description

This dataset contains description of ExData.

Usage

data(ExData)

Format

A data frame with [number of rows] rows and 1 columns:

Length

[description of column Length measured]

Source

[Include the source of the data if available]

Examples

data(ExData)
head(ExData)

Calculate Length-Based Indicators for Fish Stock Assessment #'@importFrom graphics abline axis barplot box boxplot hist legend lines par rect segments text

Description

This function calculates various length-based indicators for fish stock assessment using length frequency data and bootstrap resampling.

Usage

FishPar(data, resample, progress)

Arguments

data

A data frame containing two columns: Length and Frequency.

resample

An integer indicating the number of bootstrap resamples.

progress

A logical value indicating whether to display progress.

Value

A list containing estimated length parameters, Froese indicators, and other relevant metrics.

Examples

data <- data.frame(Length = c(10, 20, 30, 40, 50), Frequency = c(5, 10, 15, 20, 25))
FishPar(lenfreq01, 100, progress = FALSE)
utils::data("lenfreq01", package = "aLBI")
utils::data("lenfreq02", package = "aLBI")

Assess Stock Status Based on Calculated Parameters

Description

This function assesses the stock status based on parameters calculated by the FishPar function.

Usage

FishSS(data, LM_ratio, Pobj, Pmat, Popt)

Arguments

data

A data frame containing the necessary columns for stock status calculation.

LM_ratio

A numeric value representing the length at maturity ratio.

Pobj

A numeric value representing the percentage objective.

Pmat

A numeric value representing the percentage of mature fish.

Popt

A numeric value representing the percentage of optimally sized fish.

Value

A numeric vector containing TSB40 and LSB25.

Examples

utils::data("CPdata", package = "aLBI")
FishSS(CPdata, 0.75, 100, 30, 25)

Generate a Frequency Distribution Table for Fish Length Data

Description

This function creates a frequency distribution table for fish length data, using either a custom bin width or Wang's formula to calculate the ideal bin width. If the calculated bin width is a fraction, it is rounded to the nearest integer.

Arguments

data

A numeric vector or data frame containing fish length measurements. If a data frame is provided, the first numeric column will be selected.

bin_width

(Optional) A numeric value specifying the bin width for class intervals. If not provided, the bin width is automatically calculated using Wang's formula.

Lmax

(Optional) The maximum observed length of fish. Required only if the maximum length is not provided and bin width is calculated using Wang's formula.

Value

A list containing two data frames:

lfqTable

A frequency table with the length range and frequency.

lfreq

A table with the upper limits of bins and their frequencies.

Examples

# Generate random fish length data
set.seed(123)
fish_lengths <- data.frame(Length = runif(2000, min = 5, max = 70))

# Create a frequency table using Wang's formula (default)
FrequencyTable(data = fish_lengths$Length)

# Create a frequency table with a custom bin width
FrequencyTable(data = fish_lengths$Length, bin_width = 5)

lenfreq01: Example dataset for aLBI package

Description

This dataset contains description of lenfreq01.

Usage

data(lenfreq01)

Format

A data frame with [number of rows] rows and 2 columns:

Frequency

[description of column Frequency]

Length

[description of column Length]

Source

[Include the source of the data if available]

Examples

data(lenfreq01)
head(lenfreq01)

lenfreq02: Example dataset for aLBI package

Description

This dataset contains description of lenfreq02.

Usage

data(lenfreq02)

Format

A data frame with [number of rows] rows and 2 columns:

Frequency

[description of column Frequency]

LengthClass

[description of column LengthClass]

Source

[Include the source of the data if available]

Examples

data(lenfreq02)
head(lenfreq02)