Learn R Programming

⚠️There's a newer version (6.0.6) of this package.Take me there.

DLMtool

DLMtool is a R package for management strategy evalaution and implementation of data-limited fishery stock assessment methods.

Find more information about DLMtool at http://datalimitedtoolkit.org/.

Installation

The released version of DLMtool can be downloaded from CRAN:

install.packages("DLMtool")

This GitHub repository contains the development version of DLMtool. The development version may be unstable, and it is not recommended for analyses.

User Guide and Documentation

A DLMtool User Guide and documentation for the DLMtool package are now available: https://dlmtool.github.io/DLMtool/.

Bugs and Issues

Please report any bugs or issues through GitHub or the DLMtool website.

Copy Link

Version

Install

install.packages('DLMtool')

Monthly Downloads

389

Version

4.1

License

GPL-2

Maintainer

Tom Carruthers

Last Published

May 2nd, 2017

Functions in DLMtool (4.1)

AvC

Average Catch
BK_CC

Beddington and Kirkwood life-history method combined with catch curve analysis
BK_ML

Beddington and Kirkwood life-history analysis with mean-length estimator of current abundance
BlankSelPlot

Internal function to create a blank plot for mapping selectivity at length
Blow_opt

Blow internal parallel optimization function
AJ_GOM

AJ_GOM OM
Albacore

Albacore Stock
Arrowtooth_Flounder_BC_DFO_iSCAM

Arrowtooth_Flounder_BC_DFO_iSCAM OM
Atlantic_mackerel

Atlantic_mackerel Data
BK

Beddington and Kirkwood life-history MP (simple version)
COSEWIC_plot

COSEWIC forward projection plot
CSRA

Catch at size reduction analysis
DBSRA_40

Depletion-Based Stock Reduction Analysis assuming 40 per cent stock depletion
DBSRA_ML

Depletion-Based Stock Reduction Analysis using mean length estimator of stock depletion
CC1

Constant catch management procedure of Geromont and Butterworth (2014)
CC4

Constant catch management procedure of Geromont and Butterworth (2014)
Canary_Rockfish_BC_DFO

Canary_Rockfish_BC_DFO OM
Cant

What methods can't be applied to this DLM data object
Blue_shark

Blue_shark Stock
Bluefin_tuna

Bluefin_tuna Stock
CompSRA4010

Age-composition-based estimate of current stock depletion given constant Z linked to an FMSY estimate to provide OFL (with a 40-10 rule)
Converge

Check Convergence
ChooseEffort

Manually map the historical relative fishing effort trajectory.
ChooseSelect

Manually choose the historical selectivity pattern
DCAC_40

Depletion Corrected Average Catch assuming 40 per cent stock depletion
DCAC_ML

Depletion-Based Stock Reduction Analysis using mean-length estimator of current depletion
Bluefin_tuna_WAtl

Bluefin_tuna_WAtl Stock
Butterfish

Butterfish Stock
CheckConverg

MSE convergence diagnostic
China_rockfish

China_rockfish Data
DD

Delay - Difference Stock Assessment with UMSY and MSY leading
DD4010

Delay - Difference Stock Assessment with UMSY and MSY leading coupled with a 40-10 harvest control rule
Fease_xl

Read in feasibility parameters from Excel spreadsheet
Feasibility

Feasibility Fease
CSRAfunc

Optimization function for CSRA
Can

What data-limited methods can be applied to this Data object?
Cobia

Cobia Data
CompSRA

Age-composition-based estimate of current stock depletion given constant Z linked to an FMSY estimate to provide OFL
DCAC

Depletion Corrected Average Catch
DTe50

Effort searching MP aiming for 50 per cent stock depletion
Darnley_Bay_Char_DFO

Darnley_Bay_Char_DFO OM
FMSYopt

Internal function FMSY and related metrics
FMSYref

A reference FMSY method (uses perfect information about FMSY)
Fleet-class

Class 'Fleet'
ForceCor

Forces correlation among operating model parameters for M, K, Linf and L50
Generic_IncE

Generic_IncE Fleet
Generic_fleet

Generic_fleet Fleet
Cplot

Plot the median biomass and yield relative to last historical year
DAAC

Depletion Adjusted Average Catch
DDes

Effort searching version of DD - Delay - Difference Stock Assessment with UMSY and MSY leading that fishes at 75 per cent of FMSY
DFO_hist

Deparment of Fisheries and Oceans historical plot
DFO_plot2

Deparment of Fisheries and Oceans default plot 2
DFO_proj

Deparment of Fisheries and Oceans projection plot
DepF

Depletion Corrected Fratio
DynF

Dynamic Fratio MP
Imprecise_Biased

Imprecise_Biased Obs
Imprecise_Unbiased

Imprecise_Unbiased Obs
Jplot

Joint probability plot
Kplot

KOBE plot: a projection by projection plot of F/FMSY and B/BMSY
Fadapt

An adaptive MP that uses trajectory in inferred suplus production and fishing mortality rate to update a TAC
Fdem

Demographic FMSY method
Fratio

An FMSY/M ratio method
Generic_DecE

Generic_DecE Fleet
Generic_FlatE

Generic_FlatE Fleet
ITM

Index Target based on natural mortality rate
ITe10

Index Target Effort-Based 10
ITe5

Index Target Effort-Based 5
Imp-class

Class 'Imp'
LAJ_GOM

LAJ_GOM OM
DOM

How dominant is an MP?
DTe40

Effort searching MP aiming for 40 per cent stock depletion
EtargetLopt

Effort MP: adjust effort up/down if mean length above/below Ltarget
Example_datafile

Example_datafile Data
DCAC4010

Depletion Corrected Average Catch paired with the 40-10 rule
DDe

Effort control version of DD - Delay - Difference Stock Assessment with UMSY and MSY leading
DDe75

Effort control version of DD - Delay - Difference Stock Assessment with UMSY and MSY leading that fishes at 75 per cent of FMSY
Data-class

Class 'Data'
DecE_Dom

DecE_Dom Fleet
LSRA2

Alternative version of LSRA that's a wrapper for LSRA_opt to return the right type of output (mode) using sapply
LSRA_opt

Internal estimation function for LSRA and LSRA2 functions
Ltarget4

A management procedure that incrementally adjusts the TAC to reach a target mean length in catches.
LtargetE1

A management procedure that incrementally adjusts the Effort to reach a target mean length in catches.
NFref

No Fishing Reference MP
NOAA_plot

National Oceanographic and Atmospheric Administration default plot 1
Red_snapper_GOM_SS

Red_snapper_GOM_SS OM
FMSYref50

A reference FMSY method that fishes at half of FMSY (uses perfect information about FMSY)
FMSYref75

A reference FMSY method that fishes at three quarters of FMSY (uses perfect information about FMSY)
Feasibility2

Feasibility2 Fease
FlatE_Dom

FlatE_Dom Fleet
Fease-class

Class 'Fease'
Fease

MP feasibility diagnostic
GB_target

Geromont and Butterworth target CPUE and catch MP
Fratio_CC

A data-limited method that uses FMSY/M ratio and a naive catch-curve estimate of recent Z
Fratio_ML

An FMSY/M ratio MP that uses a mean length estimator of recent Z
Generic_obs

Generic_obs Obs
Gulf_blue_tilefish

Gulf_blue_tilefish Data
Gcontrol

G-control MP
HDAAC

Hybrid Depletion Adjusted Average Catch
Herring

Herring Stock
DBSRA

Depletion-Based Stock Reduction Analysis
DBSRA4010

Depletion-Based Stock Reduction Analysis paired with 40-10 harvest control rule
Fratio4010

An FMSY/M ratio method paired with the 40-10 rule
IT10

Index Target 10
IT5

Index Target 5
Islope1

A management procedure that incrementally adjusts the TAC to maintain a constant CPUE or relative abundance index
LS_GOM

LS_GOM OM
LinInterp

Linear interpolation of a y value at level xlev based on a vector x and y
LtargetE4

A management procedure that incrementally adjusts the Effort to reach a target mean length in catches.
MCD

Mean Catch Depletion
DLMDataDir

Directory of the installed package on your computer
IncE_NDom

IncE_NDom Fleet
Input

Function to run a set of input control methods
L2A

Length to age conversion
L95target

A management procedure that adjusts the TAC up/down from reference (target) level (that is a fraction of mean recent premanagement catches) to reach a target mean length of fish caught.
Mackerel

Mackerel Stock
NAor0

Is a value NA or zero.
OM_xl

Read in operating model parameters from Excel spreadsheet
Obs-class

Class 'Obs'
LBSPR

Apply the Length-based SPR model to DLMtool Data Object
LBSPR_ItEff

Length-based SPR model with HCR that iteratively adjusts Effort
LBSPR_ItSel

Length-based SPR model with HCR that iteratively adjusts Selectivity
Needed

Data needed to get MPs running
SH_GOM

SH_GOM OM
SPMSY

Catch trend Surplus Production MSY MP
Sam

Conduct stock assessment
San_Francisco_Bay_herring_California

San_Francisco_Bay_herring_California OM
SketchFun

Manually map the historical relative fishing effort trajectory.
Snapper

Snapper Stock
VOI

Calculate Value Of Information
VOI2

Calculate Value Of Information 2
Islope4

A management procedure that incrementally adjusts the TAC to maintain a constant CPUE or relative abundance index
Itarget1

A management procedure that incrementally adjusts the TAC (starting from reference level that is a fraction of mean recent catches) to reach a target CPUE / relative abundance index
Itarget4

A management procedure that incrementally adjusts the TAC (starting from reference level that is a fraction of mean recent catches) to reach a target CPUE / relative abundance index
DLMtool-package

Data-Limited Methods Toolkit
DecE_HDom

DecE_HDom Fleet
DecE_NDom

DecE_NDom Fleet
checkMSE

Check that MSE object includes all slots
compplot

Generic comparison plot for simulation testing of Stochastic SRA method
getFref2

Internal Get Reference F using Rcpp
getGpars

Extracts growth parameters from a SS3 r4ss replist
LBSPR_ItTAC

Length-based SPR model with HCR that iteratively adjusts TAC
LSRA

Estimates R0 using SRA to match current F estimates and avoid penalities for low stock sizes
LstepCE2

A management procedure that incrementally adjusts the Effort according to the mean length of recent catches.
OM-class

Class 'OM'
Pplot

A projection by projection plot of F/FMSY and B/BMSY
Pplot2

A projection by projection plot of F/FMSY, B/BMSY, B/B0, and yield
RD_GOM

RD_GOM OM
Low_Effort_Non_Target

Low_Effort_Non_Target Fleet
LstepCC1

A management procedure that incrementally adjusts the TAC according to the mean length of recent catches.
LstepCC4

A management procedure that incrementally adjusts the TAC according to the mean length of recent catches.
LstepCE1

A management procedure that incrementally adjusts the TAC according to the mean length of recent catches.
load.iscam.files

Reads iSCAM files into a hierarchical R list object
makePerf

Convert a OM object to one without observation or process error
matlenlim2

A data-limited method in which fishing vulnerability is set slightly higher than the maturity curve
mconv

Get log normal mean from transformed space mean and standard deviation
Ltarget1

A management procedure that incrementally adjusts the TAC to reach a target mean length in catches.
MRreal

An marine reserve in area 1 with full reallocation of fishing effort
MSE-class

Class 'MSE'
Precise_Biased

Precise_Biased Obs
MPStats

Calculate Statistics for MP Performance
MRnoreal

An marine reserve in area 1 with no spatial reallocation of fishing effort
OneRep

Make stochastic variables certain for only one rep
Perfect_Imp

Perfect_Imp Imp
Fdem_CC

Demographic FMSY method using catch-curve analysis to estimate recent Z
Fdem_ML

Demographic FMSY method that uses mean length data to estimate recent Z
FlatE_HDom

FlatE_HDom Fleet
FlatE_NDom

FlatE_NDom Fleet
Rcontrol

Harvest Control Rule using prior for intrinsic rate of increase
Rcontrol2

MP using prior for intrinsic rate of increase with a quadratic approximation to surplus production
Rougheye_Rockfish_BC

Rougheye_Rockfish_BC OM
SBT1

SBT simple MP
optQ_cpp

Rcpp version of the q Optimizer
ourReefFish

Example data object
read.report.file

Reads iSCAM Rep file
replic8

Enlarge (replicate) a DLM data object to create an additional dimension for simulation / sensitivity testing
Range

Standardize values
SPmod

Surplus production based catch-limit modifier
SPslope

Slope in surplus production MP
SRopt

Function that returns a stochastic estimate of steepness given observed stock recruitment data
Replace

Replace an existing Stock, Fleet, Obs, or Imp object
SPSRA

Surplus Production Stock Reduction Analysis
SPSRA_ML

Surplus Production Stock Reduction Analysis using a mean-length estimate of current stock depletion
SetRecruitCycle

Function to calculate cyclic recruitment pattern given user-specified values of period and amplitude.
Simulation_1

Simulation_1 Data
Sole

Sole Stock
Splot

Scatter plot of B/BMSY or B/B0 and F/FMSY for lastYrs
Precise_Unbiased

Precise_Unbiased Obs
Red_Snapper_GOM

Red_Snapper_GOM OM
Red_snapper

Red_snapper Data
SBT2

SBT complex MP
summary,MSE-method

Summary of MSE object
tdlnorm

Calculate density of log-normally distributed random numbers
SG_GOM

SG_GOM OM
SelectFun

Selectivity at length function
Sense

Sensitivity analysis
Swordfish_OM

Swordfish_OM OM
YPR_CC

Yield Per Recruit analysis to get FMSY proxy F01 paired to a naive catch curve estimate of recent Z
YPR_ML

Yield Per Recruit analysis to get FMSY proxy F01 paired with a mean-length estimate of current stock size
genLenComp

Generate length composition of catch
getAFC

Calculate age at first capture from length at first capture and growth
TAC

Calculate TAC recommendations for more than one MP
Tplot2

A shorter version of the plot method for MSEs that just shows the overall trade-offs
Yellowfin_Tuna_IO

Yellowfin_Tuna_IO OM
Yellowfin_tuna_IO_SS

Yellowfin_tuna_IO_SS OM
SRAcomp

Plot simulation test of Stochastic SRA method
SRAsim

Simulates catch at age and catch history data for testing SRA methods
StochasticSRA

Stochastic SRA construction of operating models
Tplot

A trade-off plot for an MSE object
getroot

Calculate slope from ageM and age95
gettempvar

Creates a time series per simulation that has gradient grad and random normal walk with sigma
plot.Imp

Plot the Implementation object parameters
plot,MSE,ANY-method

Plot MSE object
Stock-class

Class 'Stock'
TACfilter

TAC Filter
Target_All_Fish

Target_All_Fish Fleet
VOIplot

Yet another Value of Information Plot
plotOFL

A generic OFL plot for NOAA use
projOpt_cpp

Rcpp version of the Projection Optimizer
sdconv

Get log normal standard deviation from transformed space mean and standard deviation
setup

Setup parallel processing
testOM

testOM OM
trlnorm

Generate log-normally distributed random numbers
SS2DLM

Reads MLE estimates from Stock Synthesis file structure into an operating model using package r4ss
Sub

Subset MSE object by management procedure (MP) or simulation.
SubOM

Subset a Stock, Fleet, Obs, or Imp object from an OM object
GB_CC

Geromont and Butterworth Constant Catch Harvest Control Rule
GB_slope

Geromont and Butterworth index slope Harvest Control Rule
IncE_Dom

IncE_Dom Fleet
IncE_HDom

IncE_HDom Fleet
WM_GOM

WM_GOM OM
condmet

Condition met?
cparscheck

Internal function of runMSE for checking that the OM slot cpars slot is formatted correctly
getBH

Predict Beverton-Holt recruitment and return fit to S-R observations
getBlow

Blow parallel optimization function
getFMSY2

Calculate FMSY and related metrics using Rcpp code
getFref

Internal Get Reference F
TradePlot

Generic Trade-off Plot
TwoSidedFun

Internal Two sided selectivity curve
YM_GOM

YM_GOM OM
getq

Optimization function that find the catchability (q where F=qE) value required to get to user-specified stock depletion (current biomass / unfished biomass)
getq2

Optimization function that find the catchability (q where F=qE) value required to get to user-specified stock depletion (current biomass / unfished biomass) modified for Rcpp
negcorlogspace

A function that samples multivariate normal (logspace) variables
optBH

Wrapper for estimating stock recruitment parameters from resampled stock-recruitment data
read.par.file

Reads iSCAM parameter file
read.projection.file

Reads iSCAM projection file
runInMP

Runs input control MPs on a Data object.
runMSE

Run a Management Strategy Evaluation
YPR

Yield Per Recruit analysis to get FMSY proxy F01
curE

Fishing at current effort levels
curE75

Fishing at 75 per cent of current effort levels
cv

Calculate CV from vector of values
boxplot.Data

Boxplot of TAC recommendations
boxplot.MSE

Boxplot of MP performance from MSE object
getEffhist

Calculate historical fishing mortality
getFMSY

Calculate FMSY and related metrics
getmov

Optimization function to find a movement model that matches user specified movement characteristics.
getmov2

Optimization function to find a movement model that matches user specified movement characteristics modified for Rcpp.
joinMSE

Join multiple MSE objects together
lmmodel-class

Class 'lmmodel'
movfit

Optimization function that returns the squared difference between user specified and calculated movement parameters. (deprecated: now in Rcpp)
movfit_Rcpp

Rcpp version of the Optimization function that returns the squared difference between user specified and calculated movement parameters.
plot.Stock

Plot the Stock object parameters
plotFun

Print out plotting functions
doprojPI

Internal Projection Function
getSlopeFun

Internal function to calculate slope
getclass

get object class
makeTransparent

Make colors transparent
ItargetE1

A management procedure that incrementally adjusts the effort to reach a target CPUE / relative abundance index
ItargetE4

A management procedure that incrementally adjusts the Effort to reach a target CPUE / relative abundance index
MCD4010

Mean Catch Depletion
ML2D

Depletion and F estimation from mean length of catches
Perfect_Info

Perfect_Info Obs
Porgy

Porgy Stock
Required

What methods need what data
Rockfish

Rockfish Stock
slotlim

An data-limited method which sets a slot limit
summary,Data-method

Summary of Data object
Targeting_Small_Fish

Targeting_Small_Fish Fleet
Toothfish

Toothfish Stock
alphaconv

Calculate alpha parameter for beta distribution from mean and standard deviation
avail

What objects of this class are available
matlenlim

A data-limited method in which fishing vulnerability is set according to the maturity curve
plot.OM

Plot the operating model (OM) object parameters
plot.Obs

Plot the Observation object parameters
read.data.file

Reads iSCAM dat file
read.mcmc

Reads iSCAM mcmc output files
writeCSV

Internal function to write CSVs for objects
barplot.MSE

Plot a barplot of MSE results
betaconv

Calculate beta parameter for beta distribution from mean and standard deviation
doprojPI_cpp

Rcpp version of the Projection function for calculating Reference Yield
fetch.file.names

Reads iSCAM Data, Control and Projection files
getSlope1

Internal function to calculate ascending slope of selectivity curve
getSlope2

Internal function to calculate slope
iSCAM2DLM

Reads MLE estimates from iSCAM file structure into an operating model
initialize-methods

~~ Methods for Function initialize ~~
minlenLopt1

This input control sets the minimum length of fish caught to a fraction of the length that maximises the biomass, Lopt.
movdistil

Simplified a multi-area transition matrix into the best 2 x 2 representation
plot,Data,ANY-method

Plot Data object
plot.Fleet

Plot the Fleet object parameters
qopt

Internal optimization function that find the catchability (q where F=qE) value required to get to user-specified stock depletion (current biomass / unfished biomass)
read.control.file

Reads iSCAM control file
sampy

Sample vector
updateMSE

Update an MSE object with new slots
wormplot

Biomass wormplot
runMSErobust

Run a Management Strategy Evaluation