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

5.0.2

License

GPL-2

Maintainer

Tom Carruthers

Last Published

November 25th, 2017

Functions in DLMtool (5.0.2)

BK_CC

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

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

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

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

Blue_shark Stock
Blow_opt

Blow internal parallel optimization function
AAVY

Performance Metric: Probability AAVY < 0.2
Atlantic_mackerel

Atlantic_mackerel Data
Albacore

Albacore Stock
CSRA

Catch at size reduction analysis
AvC

Average Catch
CSRAfunc

Optimization function for CSRA
ChooseSelect

Manually choose the historical selectivity pattern
Bluefin_tuna

Bluefin_tuna Stock
Cobia

Cobia Data
Bluefin_tuna_WAtl

Bluefin_tuna_WAtl Stock
CC4

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

MSE convergence diagnostic
China_rockfish

China_rockfish Data
COSEWIC_plot

COSEWIC forward projection plot
CompSRA

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

Manually map the historical relative fishing effort trajectory.
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)
ChooseM

Manually map natural mortality at age or size.
Converge

Check Convergence
DBSRA4010

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

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

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

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

Effort searching MP aiming for 50 per cent stock depletion
DD_R

Internal optimization function for delay-difference MPs
DCAC4010

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

Butterfish Stock
DCAC_40

Depletion Corrected Average Catch assuming 40 per cent stock depletion
CC1

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

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

Deparment of Fisheries and Oceans trade-off plot
DCAC_ML

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

Deparment of Fisheries and Oceans default plot 2
DD

Delay - Difference Stock Assessment with UMSY and MSY leading
DataDescription

DataDescription
DFO_proj

Deparment of Fisheries and Oceans projection plot
DLMDataDir

Directory of the installed package on your computer
Data_xl

Read in Data object from Excel spreadsheet
Cant

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

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

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

Depletion Corrected Average Catch
Fdem_ML

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

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

Class 'Data'
DDe75

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

How dominant is an MP?
Example_datafile

Example_datafile Data
DTe40

Effort searching MP aiming for 40 per cent stock depletion
DecE_Dom

DecE_Dom Fleet
FMSYref

A reference FMSY method (uses perfect information about FMSY)
DecE_HDom

DecE_HDom Fleet
Fease-class

Class 'Fease'
Fease_xl

Read in feasibility parameters from Excel spreadsheet
Fleet-class

Class 'Fleet'
Fease

MP feasibility diagnostic
FleetDescription

FleetDescription
Gcontrol

G-control MP
Fratio4010

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

Generic_DecE Fleet
Fratio_CC

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

Less Precautionary Index Confidence Interval (ICI) MP by Jardim et al. (2015)
IOTC_plot

Indian Ocean Tuna Commission trade-off plot
Fratio_ML

An FMSY/M ratio MP that uses a mean length estimator of recent Z
InputRec-class

Class 'InputRec'
GB_CC

Geromont and Butterworth Constant Catch Harvest Control Rule
Feasibility

Feasibility Fease
Feasibility2

Feasibility2 Fease
Gulf_blue_tilefish

Gulf_blue_tilefish Data
FlatE_Dom

FlatE_Dom Fleet
HDAAC

Hybrid Depletion Adjusted Average Catch
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
ImpDescription

ImpDescription
LBSPR

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

Imprecise_Biased Obs
LBSPR_ItEff

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

DecE_NDom Fleet
LstepCE1

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

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

Depletion Corrected Fratio
Iratio

Mean index ratio MP from Jardim et al. 2015
Fadapt

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

Joint probability plot
Kplot

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

Demographic FMSY method
LBSPR_ItSel

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

Return class of MP from MP name
Generic_FlatE

Generic_FlatE Fleet
Generic_Fleet

Generic_Fleet Fleet
MRnoreal

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

Index Target 10
OMdoc

Generate OM Documentation Report
LBSPR_ItTAC

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

Copy example OM XL and OM Documentation
Lratio_BHI

Mean length-based indicator MP of Jardim et al. 2015 using Beverton-Holt invariant M/K ratio = 1.5 and assumes FMSY = M.
Lratio_BHI2

The more general version of the mean length-based indicator MP of Jardim et al. 2015.
ObsDescription

ObsDescription
ML2D

Depletion and F estimation from mean length of catches
OneRep

Make stochastic variables certain for only one rep
IT5

Index Target 5
PWhisker

Performance Whisker Plot
ITe5

Index Target Effort-Based 5
Imp-class

Class 'Imp'
Perfect_Imp

Perfect_Imp Imp
ForceCor

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

Rockfish Stock
Fratio

An FMSY/M ratio method
GB_slope

Geromont and Butterworth index slope Harvest Control Rule
CalcInput

Apply input control recommendations and calculate population dynamics
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.
CalcOutput

Apply output control recommendations and calculate population dynamics
LSRA_MCMC_sim

Internal SRA MCMC CPP code
LSRA_opt

Internal estimation function for LSRA and LSRA2 functions
ChkDatNA

Check Data object is valid for a MP
MPStats

Calculate Statistics for MP Performance
Needed

Data needed to get MPs running
ChkObj

Check that a DLM object is valid
OM-class

Class 'OM'
DAAC

Depletion Adjusted Average Catch
PMobj-class

An object for storing data for analysis using data-limited methods
POF

Performance Metric: Probability F < FMSY
GB_target

Geromont and Butterworth target CPUE and catch MP
Pplot

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

Index Target based on natural mortality rate
Islope1

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

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

Index Target Effort-Based 10
LSRA

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

IncE_NDom Fleet
LSRA2

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

Function to run a set of input control methods
SBT1

SBT simple MP
LstepCC1

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

Surplus production based catch-limit modifier
LstepCC4

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

Slope in surplus production MP
MCD

Mean Catch Depletion
Ltarget1

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

Manually map the historical relative fishing effort trajectory.
Ltarget4

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

Snapper Stock
LtargetE1

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

Mean Catch Depletion
TACfilter

TAC Filter
OMDescription

OMDescription
Target_All_Fish

Target_All_Fish Fleet
OM_xl

Read in operating model parameters from Excel spreadsheet
Tplot

A trade-off plot for an MSE object
P100

Performance Metric: Probability B > BMSY
P50

Performance Metric: Probability B > 0.5 BMSY
SBT2

SBT complex MP
Perfect_Info

Perfect_Info Obs
SPMSY

Catch trend Surplus Production MSY MP
Porgy

Porgy Stock
Sam

Conduct stock assessment
Sole

Sole Stock
Splot

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

Sample custom pars
StochasticSRA

Stochastic SRA construction of operating models
Tplot2

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

Stochastic SRA construction of operating models
YPR

Yield Per Recruit analysis to get FMSY proxy F01
Targeting_Small_Fish

Targeting_Small_Fish Fleet
Replace

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

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

What methods need what data
curE

Fishing at current effort levels
SRopt

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

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

Fishing at 75 per cent of current effort levels
SampleObsPars

Sample Observation Parameters
fetch.file.names

Reads iSCAM Data, Control and Projection files
SampleStockPars

Sample Stock parameters
DBSRA

Depletion-Based Stock Reduction Analysis
genLenComp

Generate length composition of catch
DDes

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

Wrapper for histogram function
DFO_hist

Deparment of Fisheries and Oceans historical plot
DLMextra

Load more data from DLMextra package
Pplot2

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

Toothfish Stock
DLMtool-package

Data-Limited Methods Toolkit
boxplot.Data

Boxplot of TAC recommendations
boxplot.MSE

Boxplot of MP performance from MSE object
DynF

Dynamic Fratio MP
LtargetE4

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

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

Mackerel Stock
NAor0

Is a value NA or zero.
FMSYref50

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

Overages Imp
P10

Performance Metric: Probability B > 0.1 BMSY
iSCAM2DLM

Reads MLE estimates from iSCAM file structure into an operating model
Precise_Biased

Precise_Biased Obs
makeTransparent

Make colors transparent
Precise_Unbiased

Precise_Unbiased Obs
matlenlim

A data-limited method in which fishing retention is set according to the maturity curve
FMSYref75

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

FlatE_HDom Fleet
movfit

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

FlatE_NDom Fleet
movfit_Rcpp

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

Generic_IncE Fleet
Generic_Obs

Generic_Obs Obs
Rcontrol2

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

Red_snapper Data
Herring

Herring Stock
SRAcomp

Plot simulation test of Stochastic SRA method
ICI

Index Confidence Interval (ICI) MP by Jardim et al. (2015)
plot,Data,ANY-method

Plot Data object
plotFleet

Plot the Fleet object parameters
Imprecise_Unbiased

Imprecise_Unbiased Obs
popdynOneTScpp

Population dynamics model for one annual time-step
SRAsim

Simulates catch at age and catch history data for testing SRA methods
prob.class-class

Prob class union for performance metric objects
Sub

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

Sensitivity analysis
SubCpars

Subset an OM cpars slot
Simulation_1

Simulation_1 Data
VOIplot

Yet another Value of Information Plot
Stock-class

Class 'Stock'
checkMSE

Check that MSE object includes all slots
compplot

Generic comparison plot for simulation testing of Stochastic SRA method
StockDescription

StockDescription
getAFC

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

Sample steepness given mean and cv
getBH

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

IncE_HDom Fleet
sampy

Sample vector
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
sdconv

Get log normal standard deviation from transformed space mean and standard deviation
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
iSCAM2Data

Reads data from iSCAM file structure into a DLMtool Data object
mconv

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

Optimize yield for a single simulation
iSCAMcomps

Combines all iSCAM age composition data across fleets
optQ

Optimize q for a single simulation
matlenlim2

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

Plot the Implementation object parameters
XL2OM

Load OM from Excel file
plot,MSE,ANY-method

Plot MSE object
projOpt_cpp

Rcpp version of the Projection Optimizer
YPR_ML

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

Reads iSCAM control file
Yield

Performance Metric: Average Yield
read.report.file

Reads iSCAM Rep file
condmet

Condition met?
replic8

Enlarge (replicate) a DLM data object to create an additional dimension for simulation / sensitivity testing
show,PMobj-method

Show the output of a PM
cparscheck

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

Simulate population dynamics for historical years
setup

Setup parallel processing
validcpars

Valid custom parameters (cpars)
VOI

Calculate Value Of Information
wormplot

Biomass wormplot
LSRA_opt_cpp

Internal estimation function for LSRA and LSRA2 functions
VOI2

Calculate Value Of Information 2
LTY

Performance Metric: Probability Long-Term Yield > 0.5 Relative Yield
alphaconv

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

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

What objects of this class are available
Low_Effort_Non_Target

Low_Effort_Non_Target Fleet
getsel

Calculate selectivity curve
cv

Calculate CV from vector of values
gettempvar

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

This function reduces the CV by 5 per cent until steepness values can be sampled without error
joinMSE

Join multiple MSE objects together
dnormal

Double-normal selectivity curve
label.class-class

Label class union for performance metric objects
makePerf

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

Rcpp version of the Projection function for calculating Reference Yield
negcorlogspace

A function that samples multivariate normal (logspace) variables
getBlow

Blow parallel optimization function
optBH

Wrapper for estimating stock recruitment parameters from resampled stock-recruitment data
getEffhist

Calculate historical fishing mortality
plotOFL

A generic OFL plot for NOAA use
plotSelect

Plot the vulnerability and retention curves
getmov2

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

Plot the Stock object parameters
getq3

optimize for catchability (q)
popdyn

Population dynamics model
MRreal

An marine reserve in area 1 with full reallocation of fishing effort
load.iscam.files

Reads iSCAM files into a hierarchical R list object
MSE-class

Class 'MSE'
NOAA_plot

National Oceanographic and Atmospheric Administration default plot 1
NFref

No Fishing Reference MP
OMinit

Initialize Operating Model
optQ_cpp

Rcpp version of the q Optimizer
ourReefFish

Example data object
Obs-class

Class 'Obs'
plotFun

Print out plotting functions
Range

Standardize values
Rcontrol

Harvest Control Rule using prior for intrinsic rate of increase
read.par.file

Reads iSCAM parameter file
SPSRA

Surplus Production Stock Reduction Analysis
read.projection.file

Reads iSCAM projection file
SPSRA_ML

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

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

Summary of Data object
SS2Data

Reads data Stock Synthesis file structure into an data object using package r4ss
SampleImpPars

Sample Implementation Error Parameters
STY

Performance Metric: Probability Short-Term Yield > 0.5 Relative Yield
SubOM

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

Calculate TAC recommendations for more than one MP
SampleFleetPars

Sample Fleet Parameters
Tplot3

Test Trade-Off Plot
plotM

Plot M-at-Age and Size
TradePlot

Generic Trade-off Plot
barplot.MSE

Plot a barplot of MSE results
popdynCPP

Population dynamics model in CPP
betaconv

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

Population dynamics model for one annual time-step
calcMean

Calculate Mean Probabilty
updateMSE

Update an MSE object with new slots
calcProb

Calculate Probabilty
runMSEnomsg

runMSE with no messages - for testing
userguide

Open the DLMtool User Guide
runMSErobust

Run a Management Strategy Evaluation
getFMSY3

Calculate FMSY and related metrics using Rcpp code
summary,MSE-method

Summary of MSE object
initialize-methods

~~ Methods for Function initialize ~~
getFref3

Calculate Reference Yield
minlenLopt1

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

Extracts growth parameters from a SS3 r4ss replist
movdistil

Simplified a multi-area transition matrix into the best 2 x 2 representation
plot.OM

Plot the operating model (OM) object parameters
getclass

get object class
tdlnorm

Calculate density of log-normally distributed random numbers
iSCAMinds

Combines indices into a single index using linear modelling
testOM

testOM OM
plotObs

Plot the Observation object parameters
trlnorm

Generate log-normally distributed random numbers
writeCSV

Internal function to write CSVs for objects
read.data.file

Reads iSCAM dat file
read.mcmc

Reads iSCAM mcmc output files
runInMP

Runs input control MPs on a Data object.
runMSE

Run a Management Strategy Evaluation