Skip to contents

Functions (class Assessment) that emulate a stock assessment by sampling the operating model biomass, abundance, and fishing mortality (with observation error, autocorrelation, and bias) instead of fitting a model. This output can then be passed onto a harvest control rule (HCR function). Shortcut is the base function that samples the OM with an error distribution. Shortcut2, the more preferable option, fits SCA in the last historical year of the operating model, estimates the error parameters using a vector autoregressive model of the residuals, and then generates model "estimates" using predict.varest. Perfect assumes no error in the assessment model and is useful for comparing the behavior of different harvest control rules. To utilize the shortcut method in closed-loop simulation, use make_MP with these functions as the Assessment model. N.B. the functions do not work with runMSE(parallel = TRUE) for MSEtool v3.4.0 and earlier.

Usage

Shortcut(
  x = 1,
  Data,
  method = c("B", "N", "RF"),
  B_err = c(0.3, 0.7, 1),
  N_err = c(0.3, 0.7, 1),
  R_err = c(0.3, 0.7, 1),
  F_err = c(0.3, 0.7, 1),
  VAR_model,
  ...
)

Shortcut2(
  x,
  Data,
  method = "N",
  SCA_args = list(),
  VAR_args = list(type = "none"),
  ...
)

Perfect(x, Data, ...)

Arguments

x

An index for the objects in Data when running in runMSE. Otherwise, equals to 1 When running an assessment interactively.

Data

An object of class Data.

method

Indicates where the error in the OM is located. For "B", OM biomass is directly sampled with error. For "N", OM abundance-at-age is sampled and biomass subsequently calculated. For "RF", recruitment and F are sampled to calculate abundance and biomass. There is no error in biological parameters for "N" and "RF". By default, "B" is used for Shortcut and "N" for Shortcut2.

B_err

If method = "B", a vector of length three that specifies the standard deviation (in logspace), autocorrelation, and bias (1 = unbiased) for biomass.

N_err

Same as B_err, but for abundance when method = "N".

R_err

Same as B_err, but for recruitment when method = "RF".

F_err

Same as B_err. Always used regardless of method to report F and selectivity for HCR.

VAR_model

An object returned by VAR to generate emulated assessment error. Used by Shortcut2.

...

Other arguments (not currently used).

SCA_args

Additional arguments to pass to SCA. Currently, arguments SR and vulnerability are obtained from the operating model.

VAR_args

Additional arguments to pass to VAR. By default, argument type = "none" (stationary time series with mean zero is assumed).

Value

An object of class Assessment.

Details

Currently there is no error in FMSY (frequently the target F in the HCR).

See Wiedenmann et al. (2015) for guidance on the magnitude of error for the shortcut emulator.

References

Wiedenmann, J., Wilberg, M.J., Sylvia, A., and Miller, T.J. 2015. Autocorrelated error in stock assessment estimates: Implications for management strategy evaluation. Fisheries Research 172: 325-334.

Author

Q. Huynh

Examples

Shortcut_4010 <- make_MP(Shortcut, HCR40_10) 
Shortcut_Nerr <- make_MP(Shortcut, HCR40_10, method = "N", N_err = c(0.1, 0.1, 1)) # Highly precise!

# Fits SCA first and then emulate it in the projection period 
Shortcut2_4010 <- make_MP(Shortcut2, HCR40_10) 

# \donttest{
# Compare the shortcut method vs. fitting an SCA model with a 40-10 control rule
MSE <- runMSE(testOM, MPs = c("Shortcut_4010", "SCA_4010"))
#>  Checking OM for completeness
#>  Loading operating model
#>  Optimizing for user-specified movement
#>  Calculating MSY reference points for each year
#>  Optimizing for user-specified depletion in last historical year
#>  Calculating historical stock and fishing dynamics
#>  Calculating per-recruit reference points
#>  Calculating B-low reference points
#>  Calculating reference yield - best fixed F strategy
#>  Simulating observed data
#>  Running forward projections
#>  1 / 2  Running MSE for Shortcut_4010 
#> 
  |==                                                | 2 % ~01s          
  |===                                               | 4 % ~01s          
  |====                                              | 6 % ~00s          
  |=====                                             | 8 % ~00s          
  |======                                            | 10% ~01s          
  |=======                                           | 12% ~01s          
  |========                                          | 14% ~01s          
  |=========                                         | 16% ~00s          
  |==========                                        | 18% ~01s          
  |===========                                       | 20% ~01s          
  |============                                      | 22% ~01s          
  |=============                                     | 24% ~00s          
  |==============                                    | 27% ~01s          
  |===============                                   | 29% ~00s          
  |================                                  | 31% ~00s          
  |=================                                 | 33% ~00s          
  |==================                                | 35% ~01s          
  |===================                               | 37% ~00s          
  |====================                              | 39% ~00s          
  |=====================                             | 41% ~00s          
  |======================                            | 43% ~00s          
  |=======================                           | 45% ~00s          
  |========================                          | 47% ~00s          
  |=========================                         | 49% ~00s          
  |==========================                        | 51% ~00s          
  |===========================                       | 53% ~00s          
  |============================                      | 55% ~00s          
  |=============================                     | 57% ~00s          
  |==============================                    | 59% ~00s          
  |===============================                   | 61% ~00s          
  |================================                  | 63% ~00s          
  |=================================                 | 65% ~00s          
  |==================================                | 67% ~00s          
  |===================================               | 69% ~00s          
  |====================================              | 71% ~00s          
  |=====================================             | 73% ~00s          
  |======================================            | 76% ~00s          
  |=======================================           | 78% ~00s          
  |========================================          | 80% ~00s          
  |=========================================         | 82% ~00s          
  |==========================================        | 84% ~00s          
  |===========================================       | 86% ~00s          
  |============================================      | 88% ~00s          
  |=============================================     | 90% ~00s          
  |==============================================    | 92% ~00s          
  |===============================================   | 94% ~00s          
  |================================================  | 96% ~00s          
  |================================================= | 98% ~00s          
  |==================================================| 100% elapsed=01s  
#> 
#>  2 / 2  Running MSE for SCA_4010 
#> 
  |==                                                | 2 % ~54s          
  |===                                               | 4 % ~27s          
  |====                                              | 6 % ~17s          
  |=====                                             | 8 % ~13s          
  |======                                            | 10% ~22s          
  |=======                                           | 12% ~18s          
  |========                                          | 14% ~15s          
  |=========                                         | 16% ~13s          
  |==========                                        | 18% ~27s          
  |===========                                       | 20% ~24s          
  |============                                      | 22% ~21s          
  |=============                                     | 24% ~19s          
  |==============                                    | 27% ~22s          
  |===============                                   | 29% ~20s          
  |================                                  | 31% ~18s          
  |=================                                 | 33% ~16s          
  |==================                                | 35% ~18s          
  |===================                               | 37% ~17s          
  |====================                              | 39% ~15s          
  |=====================                             | 41% ~14s          
  |======================                            | 43% ~16s          
  |=======================                           | 45% ~14s          
  |========================                          | 47% ~13s          
  |=========================                         | 49% ~12s          
  |==========================                        | 51% ~13s          
  |===========================                       | 53% ~12s          
  |============================                      | 55% ~11s          
  |=============================                     | 57% ~10s          
  |==============================                    | 59% ~11s          
  |===============================                   | 61% ~10s          
  |================================                  | 63% ~10s          
  |=================================                 | 65% ~09s          
  |==================================                | 67% ~09s          
  |===================================               | 69% ~08s          
  |====================================              | 71% ~08s          
  |=====================================             | 73% ~07s          
  |======================================            | 76% ~07s          
  |=======================================           | 78% ~06s          
  |========================================          | 80% ~06s          
  |=========================================         | 82% ~05s          
  |==========================================        | 84% ~05s          
  |===========================================       | 86% ~04s          
  |============================================      | 88% ~04s          
  |=============================================     | 90% ~03s          
  |==============================================    | 92% ~03s          
  |===============================================   | 94% ~02s          
  |================================================  | 96% ~01s          
  |================================================= | 98% ~01s          
  |==================================================| 100% elapsed=33s  
#> 
# }

# Compare the performance of three HCRs
Perfect_4010 <- make_MP(Perfect, HCR40_10)
Perfect_6020 <- make_MP(Perfect, HCR60_20)
Perfect_8040MSY <- make_MP(Perfect, HCR_ramp, OCP_type = "SSB_SSBMSY", TOCP = 0.8, LOCP = 0.4)

# \donttest{
MSE <- runMSE(testOM, MPs = c("Perfect_4010", "Perfect_6020", "Perfect_8040MSY"))
#>  Checking OM for completeness
#>  Loading operating model
#>  Optimizing for user-specified movement
#>  Calculating MSY reference points for each year
#>  Optimizing for user-specified depletion in last historical year
#>  Calculating historical stock and fishing dynamics
#>  Calculating per-recruit reference points
#>  Calculating B-low reference points
#>  Calculating reference yield - best fixed F strategy
#>  Simulating observed data
#>  Running forward projections
#>  1 / 3  Running MSE for Perfect_4010 
#> 
  |==                                                | 2 % ~01s          
  |===                                               | 4 % ~01s          
  |====                                              | 6 % ~00s          
  |=====                                             | 8 % ~00s          
  |======                                            | 10% ~01s          
  |=======                                           | 12% ~01s          
  |========                                          | 14% ~01s          
  |=========                                         | 16% ~00s          
  |==========                                        | 18% ~01s          
  |===========                                       | 20% ~01s          
  |============                                      | 22% ~01s          
  |=============                                     | 24% ~00s          
  |==============                                    | 27% ~01s          
  |===============                                   | 29% ~01s          
  |================                                  | 31% ~00s          
  |=================                                 | 33% ~00s          
  |==================                                | 35% ~01s          
  |===================                               | 37% ~00s          
  |====================                              | 39% ~00s          
  |=====================                             | 41% ~00s          
  |======================                            | 43% ~00s          
  |=======================                           | 45% ~00s          
  |========================                          | 47% ~00s          
  |=========================                         | 49% ~00s          
  |==========================                        | 51% ~00s          
  |===========================                       | 53% ~00s          
  |============================                      | 55% ~00s          
  |=============================                     | 57% ~00s          
  |==============================                    | 59% ~00s          
  |===============================                   | 61% ~00s          
  |================================                  | 63% ~00s          
  |=================================                 | 65% ~00s          
  |==================================                | 67% ~00s          
  |===================================               | 69% ~00s          
  |====================================              | 71% ~00s          
  |=====================================             | 73% ~00s          
  |======================================            | 76% ~00s          
  |=======================================           | 78% ~00s          
  |========================================          | 80% ~00s          
  |=========================================         | 82% ~00s          
  |==========================================        | 84% ~00s          
  |===========================================       | 86% ~00s          
  |============================================      | 88% ~00s          
  |=============================================     | 90% ~00s          
  |==============================================    | 92% ~00s          
  |===============================================   | 94% ~00s          
  |================================================  | 96% ~00s          
  |================================================= | 98% ~00s          
  |==================================================| 100% elapsed=01s  
#> 
#>  2 / 3  Running MSE for Perfect_6020 
#> 
  |==                                                | 2 % ~01s          
  |===                                               | 4 % ~01s          
  |====                                              | 6 % ~00s          
  |=====                                             | 8 % ~00s          
  |======                                            | 10% ~01s          
  |=======                                           | 12% ~01s          
  |========                                          | 14% ~01s          
  |=========                                         | 16% ~00s          
  |==========                                        | 18% ~01s          
  |===========                                       | 20% ~01s          
  |============                                      | 22% ~01s          
  |=============                                     | 24% ~00s          
  |==============                                    | 27% ~01s          
  |===============                                   | 29% ~01s          
  |================                                  | 31% ~01s          
  |=================                                 | 33% ~00s          
  |==================                                | 35% ~01s          
  |===================                               | 37% ~00s          
  |====================                              | 39% ~00s          
  |=====================                             | 41% ~00s          
  |======================                            | 43% ~00s          
  |=======================                           | 45% ~00s          
  |========================                          | 47% ~00s          
  |=========================                         | 49% ~00s          
  |==========================                        | 51% ~00s          
  |===========================                       | 53% ~00s          
  |============================                      | 55% ~00s          
  |=============================                     | 57% ~00s          
  |==============================                    | 59% ~00s          
  |===============================                   | 61% ~00s          
  |================================                  | 63% ~00s          
  |=================================                 | 65% ~00s          
  |==================================                | 67% ~00s          
  |===================================               | 69% ~00s          
  |====================================              | 71% ~00s          
  |=====================================             | 73% ~00s          
  |======================================            | 76% ~00s          
  |=======================================           | 78% ~00s          
  |========================================          | 80% ~00s          
  |=========================================         | 82% ~00s          
  |==========================================        | 84% ~00s          
  |===========================================       | 86% ~00s          
  |============================================      | 88% ~00s          
  |=============================================     | 90% ~00s          
  |==============================================    | 92% ~00s          
  |===============================================   | 94% ~00s          
  |================================================  | 96% ~00s          
  |================================================= | 98% ~00s          
  |==================================================| 100% elapsed=01s  
#> 
#>  3 / 3  Running MSE for Perfect_8040MSY 
#> 
  |==                                                | 2 % ~01s          
  |===                                               | 4 % ~01s          
  |====                                              | 6 % ~00s          
  |=====                                             | 8 % ~00s          
  |======                                            | 10% ~01s          
  |=======                                           | 12% ~01s          
  |========                                          | 14% ~01s          
  |=========                                         | 16% ~00s          
  |==========                                        | 18% ~01s          
  |===========                                       | 20% ~01s          
  |============                                      | 22% ~01s          
  |=============                                     | 24% ~01s          
  |==============                                    | 27% ~01s          
  |===============                                   | 29% ~01s          
  |================                                  | 31% ~01s          
  |=================                                 | 33% ~00s          
  |==================                                | 35% ~01s          
  |===================                               | 37% ~00s          
  |====================                              | 39% ~00s          
  |=====================                             | 41% ~00s          
  |======================                            | 43% ~00s          
  |=======================                           | 45% ~00s          
  |========================                          | 47% ~00s          
  |=========================                         | 49% ~00s          
  |==========================                        | 51% ~00s          
  |===========================                       | 53% ~00s          
  |============================                      | 55% ~00s          
  |=============================                     | 57% ~00s          
  |==============================                    | 59% ~00s          
  |===============================                   | 61% ~00s          
  |================================                  | 63% ~00s          
  |=================================                 | 65% ~00s          
  |==================================                | 67% ~00s          
  |===================================               | 69% ~00s          
  |====================================              | 71% ~00s          
  |=====================================             | 73% ~00s          
  |======================================            | 76% ~00s          
  |=======================================           | 78% ~00s          
  |========================================          | 80% ~00s          
  |=========================================         | 82% ~00s          
  |==========================================        | 84% ~00s          
  |===========================================       | 86% ~00s          
  |============================================      | 88% ~00s          
  |=============================================     | 90% ~00s          
  |==============================================    | 92% ~00s          
  |===============================================   | 94% ~00s          
  |================================================  | 96% ~00s          
  |================================================= | 98% ~00s          
  |==================================================| 100% elapsed=01s  
#> 
# }