Learn R Programming

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

MSEtool

The Management Strategy Evaluation toolkit (MSEtool) is the core package in the openMSE collection of packages. It contains the core functions for constructing operating models, simulating fishery dynamics, and evaluating the effectiveness of alternative management strategies using closed-loop simulation testing.

You can learn more about the openMSE packages at the openMSE documentation site.

Installation

You can install the released version of MSEtool from CRAN with:

install.packages("MSEtool")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("Blue-Matter/MSEtool")

Copy Link

Version

Install

install.packages('MSEtool')

Monthly Downloads

693

Version

3.1.0

License

GPL-3

Maintainer

Adrian Hordyk

Last Published

July 3rd, 2021

Functions in MSEtool (3.1.0)

CALsimp

Simplifies the CAL slot of data object
CSRAfunc

Optimization function for CSRA
BlankSelPlot

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

Check for duplicated MPs names
CheckMPs

Check that specified MPs are valid and will run on MSEtool::SimulatedData
CalcMPDynamics

Calculate population dynamics from MP recommendation
CalculateQ

Optimize for catchability (q)
CSRA

Catch at size reduction analysis
Blow_opt

Blow internal parallel optimization function
DFO_plot

Department of Fisheries and Oceans trade-off plot
CombineMMP

Create a blank MP recommendations object (class Rec) of the right dimensions
DFO_hist

Department of Fisheries and Oceans historical plot
DFO_bar

Department of Fisheries and Oceans stock status bar plot
Can

Identify management procedures (MPs) based on data availability
Cos_thresh_tab

Current default thresholds for COSEWIC satisficing
DFO_spider

DFO performance spider plot (top three MPs)
DFO_report

Create a standard DFO MSE report
Converge

Check Convergence
Data2csv

Converts a Data object into a .csv data file
Data-class

Class 'Data'
DecE_Dom

Fleet class objects
Fleet-class

Class 'Fleet'
DFO_tab_formatted

A formatted version of the standard DFO performance plot, color coded by thresholds
DataDir

Directory of the data in the installed package on your computer
DataDescription

DataDescription
DFO_tab

Create a standard DFO performance table
Cplot

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

Directory of the installed package on your computer
Fease

MP feasibility diagnostic
Atlantic_mackerel

Data class objects
Data_xl

Read in Data object from Excel spreadsheet
Imp-class

Class 'Imp'
Choose

Manually map parameters for the historical period of operating model
HistMICE

Reconstruct historical dynamics
Dom

Determine dominate MPs
ChkYrs

Check the years to summarize performance
Overages

Imp class objects
L2A

Length to age conversion
DFO_plot2

Department of Fisheries and Oceans default plot 2
DataInit

Initialize Data Input Files
FleetDescription

FleetDescription
LH2OM

Predict missing life-history parameters
MSYCalcs

Internal function to calculate MSY Reference Points
DataSlots

DataSlots
Input

Function to run a set of input control methods
FMSYref

Reference management procedures
GenerateRandomWalk

Creates a time series per simulation that has a random normal walk with sigma
Kplot

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

Fill any NAs arising from MPCalcs (hermaphroditism mode)
HistDescription

HistDescription
testOM

OM class objects
Hist-class

Class 'Hist'
LinInterp

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

LHdatabase
MPtype

Management Procedure Type
ImpDescription

ImpDescription
Sense

Sensitivity analysis
Report

Generate a Data Report
OM-class

Class 'OM'
OMexample

Copy example OM XL and OM Documentation
DFO_proj

Department of Fisheries and Oceans projection plot
ReqData

ReqData
SimulatedData

SimulatedData Data
MPurl

Get help topic URL
MSE-class

Class 'MSE'
OMinit

Initialize Operating Model
MSEDescription

MSEDescription
Pplot

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

Department of Fisheries and Oceans biomass quantile plot
NAor0

Is a value NA or zero.
RealFease

MP feasibility diagnostic using real data
ObsDescription

ObsDescription
Range

Standardize values
MSEextra

Load more data from MSEextra package
OneRep

Make stochastic variables certain for only one rep
Sub

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

Reads data Stock Synthesis file structure into a Data object using package r4ss
SIL

Slot in list: get the slot values from a list of objects
Pplot2

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

Depletion and F estimation from mean length of catches
TAC

Calculate TAC recommendations for more than one MP
Obs-class

Class 'Obs'
SSBrefplot

Plot Spawning stock biomass and reference points for both historical and projected period
Generic_Obs

Obs class objects
SubCpars

Subset an OM cpars slot
SampleImpPars

Sample Implementation Error Parameters
SampleStockPars

Sample Stock parameters
boxplot.Data

Boxplot of TAC recommendations
VOI2

Calculate Value Of Information 2
VOI

Calculate Value Of Information
SampleFleetPars

Sample Fleet Parameters
SampleCpars

Sample custom pars
calcMean

Calculate Mean Probability
SampleObsPars

Sample Observation Parameters
SubOM

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

MOM class objects
makemov

Calculates movement matrices from user inputs for fraction in each area (fracs) and probability of staying in areas (prob)
MMSE-class

Class 'MMSE'
Stock-class

Class 'Stock'
plot.pars

Plot Operating Model Object
qestMICE

Internal function for optimizing catchability (q) for a MICE model
movestockCPP

Apply the movement model to the stock for one time-step
read.control.file

Reads iSCAM control file
plotFun

Print out plotting functions
VOIplot

Yet another Value of Information Plot
VPA2OM

Reads bootstrap estimates from a VPA stock assessment into an operating model.
MOM-class

Class 'MOM'
StockDescription

StockDescription
OMDescription

OMDescription
alphaconv

Calculate parameters for beta distribution from mean and standard deviation in normal space
TradePlot

Generic Trade-Plot Function
calcProb

Calculate Probability
XL2Data

Import a Data object from Excel file
Thresh_tab

Current default thresholds for DFO satisficing
getmov2

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

Calculate Reference Yield
summary,Data-method

Summary of Data object
runInMP

Runs input control MPs on a Data object.
runCOSEWIC

COSEWIC MSE run using the correct MPs and projected time horizon
getq_multi_MICE

Optimize for catchability (q) and fishing dist for a MICE model
applyMMP

Apply multi Management Procedures (class MMP) to a hierarchical list of Data class objects
getDataList

Get part of an MP specific data-list
NIL

Item in list: get the list values from a list of lists
NOAA_plot

National Oceanographic and Atmospheric Administration default plot 1
getEffhist

Calculate historical fishing mortality
plot.MSE

Plot MSE object
iSCAM2Data

Reads data from iSCAM file structure into a Data object
plot.MMSE

Standard plot for an object of class MMSE (multi MSE)
hrate

Derives the rate of exchange from one sex to another based on asymptotic fraction
plotquant

A fairly tidy time-series quantile plot
show,Rec-method

Show the output of a single MP recommendation
replic8

Enlarge (replicate) a DLM data object to create an additional dimension for simulation / sensitivity testing
read.report.file

Reads iSCAM Rep file
popdynCPP

Population dynamics model in CPP
summary,MSE-method

Summary of MSE object
OMdoc

Generate OM Documentation Report
tinyErr

Remove observation, implementation, and process error
simCAA

Simulate Catch-at-Age Data
trlnorm

Lognormal distribution for DLMtool
initialize-methods

~~ Methods for Function initialize ~~
optQ

Optimize q for a single simulation
label.class-class

Label class union for performance metric objects
ldim

Dimensions of a hierarchical list object
iSCAMinds

Combines indices into a single index using linear modelling
XL2Fleet

Import Fleet Object from Excel file
popdynOneTScpp

Aging and Mortality for one time-step
optMSY_eq

Internal wrapper function to calculate MSY reference points (now using MSYCalcs)
PMLimit

Create a table of Performance Limits and Performance Objectives
PWhisker

Performance Whisker Plot
PMobj-class

An object for storing data for analysis using data-limited methods
prob.class-class

Prob class union for performance metric objects
Rec-class

Class 'Rec'
simmov

Calculates movement matrices from user inputs
read.par.file

Reads iSCAM parameter file
PerformanceMetric

Performance Metrics Methods
SS2DataMOM

Reads data Stock Synthesis file structure into a nested Data object analogous with multiMSE
SketchFun

Manually map the historical relative fishing effort trajectory.
SS2MOM

Import Stock Synthesis to MOM (2-sex multi-fleet) or OM (single-sex, single-fleet)
Replace

Replace an existing Stock, Fleet, Obs, or Imp object
read.projection.file

Reads iSCAM projection file
simCAL

Simulate Catch-at-Length Data
expandHerm

Expand the Herm list in SexPars to a matrix of fractions at age
dnormal

Double-normal selectivity curve
getAFC

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

Turing Test
Albacore

Stock class objects
Uses

Find the Management Procedures that use a particular data slot
XL2Stock

Import Stock Object from Excel file
XL2OM

Load OM from Excel file
cv

Calculate CV from vector of values
cparscheck

Internal function for checking that the OM@cpars is formatted correctly
fetch.file.names

Reads iSCAM Data, Control and Projection files
genSizeCompWrap

Wrapper for C++ function to generate length composition
getBlow

Blow parallel optimization function
iSCAMcomps

Combines all iSCAM age composition data across fleets
movfit_Rcpp

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

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

Plot several plots with a shared legend
joinData

Join Data objects present in a list
Required

What management procedures need what data
ResFromRel

Returns Results of a set of MICE relationships
SimulateMOM

Run a multi-fleet multi-stock Management Strategy Evaluation
multiDataS

Combine data among stocks
multidebug

A basic comparison of runMSE output (MSE) and multiMSE (MMSE)
popdynMICE

Population dynamics for a MICE model (multiyear)
optCPU

Determine optimal number of cpus
setup

Setup parallel processing
popdynOneMICE

Population dynamics for a MICE model (single year)
multiData

Combine data among fleets
show,PMobj-method

Show the output of a PM
writeCSV

Internal function to write CSVs for objects
TEG

Tom's expand grid
avail

What objects of this class are available
applyMP

Apply Management Procedures to an object of class Data
TACfilter

TAC Filter
char.log-class

Class union for isRel slot
runMP

Run a Management Procedure
Simulate

Run a Management Strategy Evaluation
sample_steepness2

Sample steepness given mean and cv
sdconv

Get parameters of lognormal distribution from mean and standard deviation in normal space
validcpars

Valid custom parameters (cpars)
getclass

get object class
getfirstlev

Extract the first dimension of a hierarchical list of recommendation objects
checkMSE

Utility functions for MSE objects
wormplot

Biomass wormplot
makeTransparent

Make colors transparent
hist2

Wrapper for histogram function
plot.Data

Plot Data object
getsel

Calculate selectivity curve
load.iscam.files

Reads iSCAM files into a hierarchical R list object
optYield

Optimize yield for a single simulation
plotOFL

A generic OFL plot for NOAA use
read.mcmc

Reads iSCAM mcmc output files
read.data.file

Reads iSCAM dat file
plotmulti

A basic SSB plot for debugging runMSE output