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.1.3

License

GPL-2

Maintainer

Tom Carruthers

Last Published

March 26th, 2018

Functions in DLMtool (5.1.3)

BlankSelPlot

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

Average Catch
Atlantic_mackerel

Atlantic_mackerel Data
BK_CC

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

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

Albacore Stock
BK_ML

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

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

Performance Metric: Probability AAVY < 0.2
Blue_shark

Blue_shark Stock
CSRA

Catch at size reduction analysis
BK

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

Bluefin_tuna Stock
DCAC_40

Depletion Corrected Average Catch assuming 40 per cent stock depletion
ChooseM

Manually map natural mortality at age or size.
Blow_opt

Blow internal parallel optimization function
Cplot

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

COSEWIC forward projection plot
ChooseSelect

Manually choose the historical selectivity pattern
DAAC

Depletion Adjusted Average Catch
Bluefin_tuna_WAtl

Bluefin_tuna_WAtl Stock
Butterfish

Butterfish Stock
Cobia

Cobia Data
DFO_plot

Deparment of Fisheries and Oceans trade-off plot
DCAC_ML

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

Average Catch with a size limit
DataInit

Initialize an empty Data workbook or CSV
CompSRA

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

Delay - Difference Stock Assessment with UMSY and MSY leading
CSRAfunc

Optimization function for CSRA
Data_xl

Read in Data object from Excel spreadsheet
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)
Can

What management procedures can be applied to this Data object?
Fadapt

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

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

Check Convergence
Fdem

Demographic FMSY method
Cant

What management procedures can't be applied to this DLM data object
DBSRA

Depletion-Based Stock Reduction Analysis
ChkObj

Check that a DLM object is valid
DTe50

Effort searching MP aiming for 50 per cent stock depletion
DBSRA4010

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

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

Deparment of Fisheries and Oceans default plot 2
DFO_hist

Deparment of Fisheries and Oceans historical plot
DLMextra

Load more data from DLMextra package
ChooseEffort

Manually map the historical relative fishing effort trajectory.
DFO_proj

Deparment of Fisheries and Oceans projection plot
DynF

Dynamic Fratio MP
DLMDataDir

Directory of the installed package on your computer
DTe40

Effort searching MP aiming for 40 per cent stock depletion
DBSRA_40

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

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

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

Data-Limited Methods Toolkit
DCAC

Depletion Corrected Average Catch
Fease-class

Class 'Fease'
DOM

How dominant is an MP?
Example_datafile

Example_datafile Data
FMSYref50

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

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

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

MP feasibility diagnostic
Fease_xl

Read in feasibility parameters from Excel spreadsheet
Data-class

Class 'Data'
China_rockfish

China_rockfish Data
Fratio4010

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

Feasibility Fease
Fratio_CC

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

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

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

DataDescription
Generic_FlatE

Generic_FlatE Fleet
Fratio

An FMSY/M ratio method
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
Generic_Fleet

Generic_Fleet Fleet
Generic_IncE

Generic_IncE Fleet
GB_slope

Geromont and Butterworth index slope Harvest Control Rule
ImpDescription

ImpDescription
Generic_Obs

Generic_Obs Obs
DecE_Dom

DecE_Dom Fleet
Imprecise_Biased

Imprecise_Biased Obs
Fratio_ML

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

Geromont and Butterworth target CPUE and catch MP
DecE_HDom

DecE_HDom Fleet
Itarget1_MPA

A example mixed control MP that uses the Itarget1 output control MP together with a spatial closure.
GB_CC

Geromont and Butterworth Constant Catch Harvest Control Rule
FMSYref75

A reference FMSY method that fishes at three quarters of FMSY (uses perfect information about FMSY)
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
DecE_NDom

DecE_NDom Fleet
Herring

Herring Stock
Imp-class

Class 'Imp'
FlatE_HDom

FlatE_HDom Fleet
ICI

Index Confidence Interval (ICI) MP by Jardim et al. (2015)
IT10

Index Target 10
Iratio

Mean index ratio MP from Jardim et al. 2015
ITe5

Index Target Effort-Based 5
FlatE_NDom

FlatE_NDom Fleet
Islope1

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

Index Target 5
Kplot

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

IncE_NDom Fleet
ItargetE1

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

Depletion Corrected Fratio
L2A

Length to age conversion
ItargetE4

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

Function to run a set of input control methods
Low_Effort_Non_Target

Low_Effort_Non_Target Fleet
Gulf_blue_tilefish

Gulf_blue_tilefish Data
Feasibility2

Feasibility2 Fease
ITe10

Index Target Effort-Based 10
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.
HDAAC

Hybrid Depletion Adjusted Average Catch
MCD4010

Mean Catch Depletion
Imprecise_Unbiased

Imprecise_Unbiased Obs
FlatE_Dom

FlatE_Dom Fleet
Generic_DecE

Generic_DecE Fleet
ITM

Index Target based on natural mortality rate
Fleet-class

Class 'Fleet'
IncE_HDom

IncE_HDom Fleet
ICI2

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

FleetDescription
LstepCC4

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

Indian Ocean Tuna Commission trade-off plot
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.
Gcontrol

G-control MP
LstepCE1

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

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

Class 'OM'
LSRA

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

Initialize Operating Model
MPStats

Calculate Statistics for MP Performance
OMDescription

OMDescription
Obs-class

Class 'Obs'
LstepCE2

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

Depletion and F estimation from mean length of catches
MPtype

Management Procedure Type
NOAA_plot

National Oceanographic and Atmospheric Administration default plot 1
PWhisker

Performance Whisker Plot
Ltarget1

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

Data needed to get MPs running
Perfect_Imp

Perfect_Imp Imp
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
P100

Performance Metric: Probability B > BMSY
MRnoreal

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

Red_snapper Data
LSRA2

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

Performance Metric: Probability B > 0.5 BMSY
Replace

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

A marine reserve in area 1 with full reallocation of fishing effort
SBT1

SBT simple MP
LSRA_MCMC_sim

Internal SRA MCMC CPP code
LtargetE4

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

SBT complex MP
LSRA_opt

Internal estimation function for LSRA and LSRA2 functions
MCD

Mean Catch Depletion
LTY

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

Performance Metric: Probability Short-Term Yield > 0.5 Relative Yield
MSE-class

Class 'MSE'
LinInterp

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

Sample custom pars
LSRA_opt_cpp

Internal estimation function for LSRA and LSRA2 functions
Mackerel

Mackerel Stock
POF

Performance Metric: Probability F < FMSY
PMobj-class

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

TAC Filter
Lratio_BHI2

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

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

Perfect_Info Obs
Target_All_Fish

Target_All_Fish Fleet
NAor0

Is a value NA or zero.
Porgy

Porgy Stock
LstepCC1

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

No Fishing Reference MP
SampleFleetPars

Sample Fleet Parameters
Rcontrol2

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

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

Sample Implementation Error Parameters
Ltarget4

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

A projection by projection plot of F/FMSY, B/BMSY, B/B0, and yield
Stock-class

Class 'Stock'
Rec-class

Class 'Rec'
ObsDescription

ObsDescription
SRAsim

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

StockDescription
XL2OM

Load OM from Excel file
OneRep

Make stochastic variables certain for only one rep
SRopt

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

Calculate Value Of Information
Sense

Sensitivity analysis
YPR

Yield Per Recruit analysis to get FMSY proxy F01
VOI2

Calculate Value Of Information 2
Precise_Biased

Precise_Biased Obs
SimulatedData

SimulatedData Data
SPSRA

Surplus Production Stock Reduction Analysis
boxplot.Data

Boxplot of TAC recommendations
Precise_Unbiased

Precise_Unbiased Obs
SubOM

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

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

Calculate Mean Probabilty
OMdoc

Generate OM Documentation Report
SS2Data

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

Catch trend Surplus Production MSY MP
OMexample

Copy example OM XL and OM Documentation
YPR_ML

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

Yet another Value of Information Plot
TAC

Calculate TAC recommendations for more than one MP
Overages

Overages Imp
getEffhist

Calculate historical fishing mortality
XL2Data

Import a Data object from Excel file
makeTransparent

Make colors transparent
getFref3

Calculate Reference Yield
Tplot

A trade-off plot for an MSE object
matlenlim

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

Performance Metric: Average Yield
hist2

Wrapper for histogram function
Tplot2

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

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

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

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

A function that samples multivariate normal (logspace) variables
plotMPA

Plot the Historical Spatial Closures
YPR_CC

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

Fishing at 75 per cent of current effort levels
StochasticSRA

Stochastic SRA construction of operating models
popdynOneTScpp

Population dynamics model for one annual time-step
SPslope

Slope in surplus production MP
StochasticSRAcpp

Stochastic SRA construction of operating models
prob.class-class

Prob class union for performance metric objects
cv

Calculate CV from vector of values
SRAcomp

Plot simulation test of Stochastic SRA method
getsel

Calculate selectivity curve
Tplot3

Test Trade-Off Plot
getGpars

Extracts growth parameters from a SS3 r4ss replist
gettempvar

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

Sample Observation Parameters
P10

Performance Metric: Probability B > 0.1 BMSY
getclass

get object class
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
SampleStockPars

Sample Stock parameters
optQ

Optimize q for a single simulation
Range

Standardize values
plotM

Plot M-at-Age and Size
getmov2

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

A generic OFL plot for NOAA use
optBH

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

Harvest Control Rule using prior for intrinsic rate of increase
getq3

optimize for catchability (q)
optCPU

Determine optimal number of cpus
plotSelect

Plot the vulnerability and retention curves
Required

What management procedures need what data
plot.MSE

Plot MSE object
plotFun

Print out plotting functions
optMSY

Optimize yield for a single simulation
runMSEnomsg

runMSE with no messages - for testing
replic8

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

Biomass wormplot
Rockfish

Rockfish Stock
runMSErobust

Run a Management Strategy Evaluation
runInMP

Runs input control MPs on a Data object.
writeCSV

Internal function to write CSVs for objects
sample_steepness2

Sample steepness given mean and cv
SPSRA_ML

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

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

Generate log-normally distributed random numbers
SubCpars

Subset an OM cpars slot
SPmod

Surplus production based catch-limit modifier
TradePlot

Generic Trade-off Plot
dnormal

Double-normal selectivity curve
applyMP

Apply Management Procedures to an object of class Data
barplot.MSE

Plot a barplot of MSE results
iSCAMinds

Combines indices into a single index using linear modelling
Snapper

Snapper Stock
initialize-methods

~~ Methods for Function initialize ~~
avail

What objects of this class are available
betaconv

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

Sole Stock
calcProb

Calculate Probabilty
iSCAM2Data

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

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

Check that MSE object includes all slots
matlenlim2

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

Combines all iSCAM age composition data across fleets
load.iscam.files

Reads iSCAM files into a hierarchical R list object
derive_beta_par

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

Sample vector
mconv

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

Update an MSE object with new slots
curE

Fishing at current effort levels
summary,Data-method

Summary of Data object
makePerf

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

Plot the Observation object parameters
fetch.file.names

Reads iSCAM Data, Control and Projection files
ourReefFish

Example data object
getAFC

Calculate age at first capture from length at first capture and growth
summary,MSE-method

Summary of MSE object
plot.Data

Plot Data object
plotFleet

Plot the Fleet object parameters
Simulation_1

Simulation_1 Data
read.report.file

Reads iSCAM Rep file
read.projection.file

Reads iSCAM projection file
read.control.file

Reads iSCAM control file
SketchFun

Manually map the historical relative fishing effort trajectory.
condmet

Condition met?
runMP

Run a Management Procedure
Targeting_Small_Fish

Targeting_Small_Fish Fleet
read.data.file

Reads iSCAM dat file
getBH

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

Toothfish Stock
runMSE

Run a Management Strategy Evaluation
show,PMobj-method

Show the output of a PM
getBlow

Blow parallel optimization function
compplot

Generic comparison plot for simulation testing of Stochastic SRA method
joinMSE

Join multiple MSE objects together
tdlnorm

Calculate density of log-normally distributed random numbers
show,Rec-method

Show the output of a single MP recommendation
label.class-class

Label class union for performance metric objects
popdynCPP

Population dynamics model in CPP
plotImp

Plot the Implementation object parameters
testOM

testOM OM
simYears

Simulate population dynamics for historical years
read.mcmc

Reads iSCAM mcmc output files
plot.OM

Plot the operating model (OM) object parameters
slotlim

An data-limited method which sets a slot limit
read.par.file

Reads iSCAM parameter file
setup

Setup parallel processing
plotStock

Plot the Stock object parameters
sdconv

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

Open the DLMtool User Guide
validcpars

Valid custom parameters (cpars)