Learn R Programming

⚠️There's a newer version (3.7.3) 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

397

Version

3.1.1

License

GPL-3

Maintainer

Adrian Hordyk

Last Published

July 8th, 2021

Functions in MSEtool (3.1.1)

Blow_opt

Blow internal parallel optimization function
CalculateQ

Optimize for catchability (q)
CSRA

Catch at size reduction analysis
Can

Identify management procedures (MPs) based on data availability
CALsimp

Simplifies the CAL slot of data object
CheckDuplicate

Check for duplicated MPs names
CheckMPs

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

Optimization function for CSRA
CalcMPDynamics

Calculate population dynamics from MP recommendation
BlankSelPlot

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

Check the years to summarize performance
DFO_hist

Department of Fisheries and Oceans historical plot
DFO_bar

Department of Fisheries and Oceans stock status bar plot
Choose

Manually map parameters for the historical period of operating model
DFO_plot2

Department of Fisheries and Oceans default plot 2
DFO_quant

Department of Fisheries and Oceans biomass quantile plot
DFO_plot

Department of Fisheries and Oceans trade-off plot
DFO_proj

Department of Fisheries and Oceans projection plot
DLMDataDir

Directory of the installed package on your computer
Atlantic_mackerel

Data class objects
DFO_spider

DFO performance spider plot (top three MPs)
DFO_report

Create a standard DFO MSE report
CombineMMP

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

Fleet class objects
Converge

Check Convergence
Data2csv

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

Class 'Fleet'
Cplot

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

Current default thresholds for COSEWIC satisficing
FMSYref

Reference management procedures
Data-class

Class 'Data'
Input

Function to run a set of input control methods
Dom

Determine dominate MPs
FleetDescription

FleetDescription
Data_xl

Read in Data object from Excel spreadsheet
DataSlots

DataSlots
HistDescription

HistDescription
ML2D

Depletion and F estimation from mean length of catches
DataInit

Initialize Data Input Files
LinInterp

Linear interpolation of a y value at level xlev based on a vector x and y
Hist-class

Class 'Hist'
LHdatabase

LHdatabase
MMSE-class

Class 'MMSE'
DFO_tab

Create a standard DFO performance table
DFO_tab_formatted

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

MSEDescription
MSEextra

Load more data from MSEextra package
Overages

Imp class objects
DataDir

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

OM class objects
Albacore_TwoFleet

MOM class objects
MOM-class

Class 'MOM'
HistMICE

Reconstruct historical dynamics
DataDescription

DataDescription
Kplot

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

Get help topic URL
OM-class

Class 'OM'
GenerateRandomWalk

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

Fill any NAs arising from MPCalcs (hermaphroditism mode)
MSE-class

Class 'MSE'
Replace

Replace an existing Stock, Fleet, Obs, or Imp object
Rec-class

Class 'Rec'
PerformanceMetric

Performance Metrics Methods
MPtype

Management Procedure Type
NAor0

Is a value NA or zero.
SSBrefplot

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

Internal function to calculate MSY Reference Points
PWhisker

Performance Whisker Plot
Generic_Obs

Obs class objects
PMLimit

Create a table of Performance Limits and Performance Objectives
Fease

MP feasibility diagnostic
Obs-class

Class 'Obs'
ObsDescription

ObsDescription
Sub

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

Subset an OM cpars slot
TACfilter

TAC Filter
SampleCpars

Sample custom pars
TEG

Tom's expand grid
SS2DataMOM

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

Manually map the historical relative fishing effort trajectory.
SubOM

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

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

Stock class objects
OMDescription

OMDescription
Pplot

A projection by projection plot of F/FMSY and B/BMSY
PMobj-class

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

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

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

Sample Fleet Parameters
OMdoc

Generate OM Documentation Report
SampleImpPars

Sample Implementation Error Parameters
StockDescription

StockDescription
Turing

Turing Test
applyMMP

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

Calculate Mean Probability
getDataList

Get part of an MP specific data-list
boxplot.Data

Boxplot of TAC recommendations
VOIplot

Yet another Value of Information Plot
Uses

Find the Management Procedures that use a particular data slot
Stock-class

Class 'Stock'
SS2Data

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

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

Make stochastic variables certain for only one rep
VPA2OM

Reads bootstrap estimates from a VPA stock assessment into an operating model.
Range

Standardize values
getAFC

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

Utility functions for MSE objects
getq_multi_MICE

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

Wrapper for histogram function
multiData

Combine data among fleets
getmov2

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

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

Calculate selectivity curve
char.log-class

Class union for isRel slot
RealFease

MP feasibility diagnostic using real data
Imp-class

Class 'Imp'
ImpDescription

ImpDescription
makemov

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

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

Join Data objects present in a list
join_plots

Plot several plots with a shared legend
movestockCPP

Apply the movement model to the stock for one time-step
getEffhist

Calculate historical fishing mortality
plot.Data

Plot Data object
LH2OM

Predict missing life-history parameters
L2A

Length to age conversion
optYield

Optimize yield for a single simulation
NIL

Item in list: get the list values from a list of lists
read.control.file

Reads iSCAM control file
qestMICE

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

National Oceanographic and Atmospheric Administration default plot 1
OMexample

Copy example OM XL and OM Documentation
getBlow

Blow parallel optimization function
Report

Generate a Data Report
OMinit

Initialize Operating Model
ReqData

ReqData
read.data.file

Reads iSCAM dat file
read.mcmc

Reads iSCAM mcmc output files
TAC

Calculate TAC recommendations for more than one MP
XL2Stock

Import Stock Object from Excel file
calcProb

Calculate Probability
XL2OM

Load OM from Excel file
plot.MSE

Plot MSE object
plotquant

A fairly tidy time-series quantile plot
Required

What management procedures need what data
ResFromRel

Returns Results of a set of MICE relationships
Sense

Sensitivity analysis
calcRefYield

Calculate Reference Yield
SimulatedData

SimulatedData Data
VOI2

Calculate Value Of Information 2
VOI

Calculate Value Of Information
XL2Data

Import a Data object from Excel file
cparscheck

Internal function for checking that the OM@cpars is formatted correctly
XL2Fleet

Import Fleet Object from Excel file
show,Rec-method

Show the output of a single MP recommendation
simCAA

Simulate Catch-at-Age Data
genSizeCompWrap

Wrapper for C++ function to generate length composition
plot.pars

Plot Operating Model Object
iSCAMinds

Combines indices into a single index using linear modelling
initialize-methods

~~ Methods for Function initialize ~~
fetch.file.names

Reads iSCAM Data, Control and Projection files
Thresh_tab

Current default thresholds for DFO satisficing
popdynCPP

Population dynamics model in CPP
SampleStockPars

Sample Stock parameters
SampleObsPars

Sample Observation Parameters
iSCAM2OM

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

Calculate CV from vector of values
read.par.file

Reads iSCAM parameter file
sample_steepness2

Sample steepness given mean and cv
read.projection.file

Reads iSCAM projection file
tinyErr

Remove observation, implementation, and process error
sdconv

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

Apply Management Procedures to an object of class Data
TradePlot

Generic Trade-Plot Function
getfirstlev

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

get object class
iSCAMcomps

Combines all iSCAM age composition data across fleets
multiDataS

Combine data among stocks
SimulateMOM

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

Reads data from iSCAM file structure into a Data object
hrate

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

A basic SSB plot for debugging runMSE output
plotFun

Print out plotting functions
plotOFL

A generic OFL plot for NOAA use
trlnorm

Lognormal distribution for DLMtool
makeTransparent

Make colors transparent
optQ

Optimize q for a single simulation
load.iscam.files

Reads iSCAM files into a hierarchical R list object
runMP

Run a Management Procedure
read.report.file

Reads iSCAM Rep file
optMSY_eq

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

Setup parallel processing
Simulate

Run a Management Strategy Evaluation
show,PMobj-method

Show the output of a PM
avail

What objects of this class are available
wormplot

Biomass wormplot
validcpars

Valid custom parameters (cpars)
simCAL

Simulate Catch-at-Length Data
popdynOneTScpp

Aging and Mortality for one time-step
simmov

Calculates movement matrices from user inputs
prob.class-class

Prob class union for performance metric objects
dnormal

Double-normal selectivity curve
ldim

Dimensions of a hierarchical list object
expandHerm

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

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

Internal function to write CSVs for objects
label.class-class

Label class union for performance metric objects
multidebug

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

Determine optimal number of cpus
popdynMICE

Population dynamics for a MICE model (multiyear)
popdynOneMICE

Population dynamics for a MICE model (single year)
runInMP

Runs input control MPs on a Data object.
runCOSEWIC

COSEWIC MSE run using the correct MPs and projected time horizon
summary,Data-method

Summary of Data object
summary,MSE-method

Summary of MSE object