-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.json
More file actions
1 lines (1 loc) · 242 KB
/
search.json
File metadata and controls
1 lines (1 loc) · 242 KB
1
[{"path":"/articles/00_sablefish_example.html","id":"defining-operating-models","dir":"Articles","previous_headings":"","what":"Defining Operating Models","title":"Sablefish MSE Example","text":"base operating model (OM) object, sable_om, already available package start . OMs developed example vary terms recruitment projected future, load base OM object simply modify recruitment parameter(s). OM1 (om_rand_recruit) project future recruitment resampling historical recruitment timeseries, using resample_recruits function: OM2 (om_bh_recruit) projects future recruitment via Beverton-Holt stock recruit relationship \\(h=0.85\\) \\(\\sigma_R = 1.20\\). state-dependent recruitment function, underlying beverton_holt R function “function factory”, whose returned function used internally MSE compute recruitment based current spawning biomass. OM3 (om_bhcyclic_recruit) projects future recruitment occurring distinct regimes: first “low” regime 20 years, followed “high” regime 5 years. regimes uniquely parameterized Beverton-Holt stock recruitment relationships differ respect \\(R_0\\) \\(S_0\\) parameters. type recruitment function available provided bevholt_regimes function. four OM objects placed list later passed MSE function.","code":"library(SablefishMSE) data(sable_om) # Normal recruitment data(om_rand_recruit) om_rand_recruit$recruitment ## $func ## function(hist_recruits, nyears, seed){ ## set.seed(seed) ## return(sample(hist_recruits, size=nyears, replace=TRUE)) ## } ## ## $pars ## $pars$hist_recruits ## 1960 1961 1962 1963 1964 1965 1966 1967 ## 28.02120 29.71580 31.69360 33.56320 34.66580 35.07580 33.41820 30.67780 ## 1968 1969 1970 1971 1972 1973 1974 1975 ## 27.83260 25.40080 23.22660 21.31440 19.81614 18.79288 18.57922 9.06294 ## 1976 1977 1978 1979 1980 1981 1982 1983 ## 10.31614 10.85754 13.65474 83.98160 41.82600 19.33290 74.28580 36.24560 ## 1984 1985 1986 1987 1988 1989 1990 1991 ## 14.32186 15.99548 23.86060 10.12922 7.20310 8.38934 11.69706 22.77260 ## 1992 1993 1994 1995 1996 1997 1998 1999 ## 7.86546 24.32680 6.83952 7.27954 12.16022 20.26580 10.05634 36.35860 ## 2000 2001 2002 2003 2004 2005 2006 2007 ## 15.98118 16.15600 42.62800 13.30080 9.89198 11.78916 7.59538 10.23582 ## 2008 2009 2010 2011 2012 2013 2014 2015 ## 9.69452 15.73100 21.31020 10.30400 11.22174 4.69700 7.48688 14.40154 ## 2016 2017 2018 2019 2020 2021 2022 2023 ## 49.54060 21.69120 95.37040 86.48080 40.60020 75.09140 42.68520 26.71460 ## ## $pars$nyears ## [1] 1100 data(om_bh_recruit) om_bh_recruit$recruitment ## $func ## function(h, R0, S0, sigR, seed){ ## # note that the set.seed() call needs to happen ## # outside of the returned function, or else there ## # will be no random variability in recruitment draws ## set.seed(seed) ## function(ssb, y){ ## bh <- (4*R0*h*ssb)/((1-h)*R0*(S0/R0) + (5*h - 1)*ssb) ## return( ## bh #* exp(rnorm(1, mean=-sigR*sigR/2, sd=sigR)) # lognormal ## ) ## } ## } ## ## $pars ## $pars$h ## [1] 0.85 ## ## $pars$R0 ## [1] 15 ## ## $pars$S0 ## [1] 328.6342 ## ## $pars$sigR ## [1] 1.2 data(om_bhcyclic_recruit) om_bhcyclic_recruit$recruitment ## $func ## function(h, sbpr, R0s, sigRs, nyears, regime_length, starting_regime, seed){ ## set.seed(seed) ## function(ssb, y){ ## regs <- rep(NA, nyears) ## curr_regime <- starting_regime ## y1 <- 1 ## while(y1 < nyears){ ## reg_len <- regime_length[curr_regime+1] ## regs[y1:(y1+reg_len-1)] <- curr_regime+1 ## curr_regime <- !curr_regime ## y1 <- y1+reg_len ## } ## R0s <- R0s[regs] ## sigRs <- sigRs[regs] ## # print(regs) ## # print(R0s) ## # print(sigRs) ## ## R0 <- R0s[y] ## sigR <- sigRs[y] ## S0 <- sbpr*R0 ## bh <- (4*R0*h*ssb)/((1-h)*R0*(S0/R0) + (5*h - 1)*ssb) ## return( ## bh #* exp(rnorm(1, mean=-sigR*sigR/2, sd=sigR)) # lognormal ## ) ## } ## } ## ## $pars ## $pars$h ## [1] 0.85 ## ## $pars$sbpr ## [1] 21.90895 ## ## $pars$R0 ## [1] 12.5 50.0 ## ## $pars$sigR ## [1] 1.2 1.2 ## ## $pars$nyears ## [1] 1100 ## ## $pars$regime_length ## [1] 20 5 ## ## $pars$starting_regime ## [1] 0 om_list <- afscOM::listN(om_rand_recruit, om_bh_recruit, om_bhcyclic_recruit, om_immcrash_recruit)"},{"path":"/articles/00_sablefish_example.html","id":"defining-management-procedures","dir":"Articles","previous_headings":"","what":"Defining Management Procedures","title":"Sablefish MSE Example","text":"Management procedures (MPs) specified complex list values define specifics harvest control rule applied, reference point targets use, ABC-TAC TAC-landings reductions, survey frequency, assessment frequency. default MP object available setup_mp_options function. eleven MPs specified differ terms HCR function reference point target, default MP object can, largely reused. MP1 (mp_f40) implementation NPFMC Tier 3 HCR currently used manage sablefish Alaska. threshold HCR uses target reference point \\(SPR_{40\\%}\\). HCR function (tier3) outputs units fishing mortality (F), specified “units”. harvest cap stability constraints applied. MP2 (mp_f50) simple variation MP1, target reference points based \\(SPR_{50\\%}\\) instead \\(SPR_{40\\%}\\). MP3 (mp_5perc) another simple variation MP1, stability constraint 5% applied ABC. Otherwise, MPs defined exactly MP1. stability constraints limit year--year change ABC specified percentage, ABC increase decrease specified percentage one year next. Stability constraints implemented catch units, thus applied tier3 HCR function output recommended F. MP4 (mp_25cap) another simple variation MP1, whereby maximum permissible TAC implemented. recommended TAC (via evaluation HCR function) exceeds specified harvest cap, TAC reduced harvest cap exactly. Attainment applied harvest cap applied. four MP objects placed master list later passed MSE function.","code":"mp_base <- setup_mp_options() mp_base ## $hcr ## $hcr$func ## NULL ## ## $hcr$extra_pars ## [1] NA ## ## $hcr$extra_options ## $hcr$extra_options$max_stability ## [1] NA ## ## $hcr$extra_options$harvest_cap ## [1] NA ## ## ## $hcr$units ## NULL ## ## ## $ref_points ## $ref_points$spr_target ## [1] 0.4 ## ## $ref_points$rp_start_age ## [1] 1 ## ## $ref_points$rp_hyperallometry ## [1] 1 ## ## ## $management ## $management$abc_tac_reduction ## [1] 1 ## ## $management$tac_land_reduction ## [1] 1 ## ## ## $survey_frequency ## [1] 1 ## ## $assessment_frequency ## [1] 1 data(mp_f40) mp_f40 ## $hcr ## $hcr$func ## function(ref_pts, naa, dem_params, avgrec, cutoff_age=1, hyperallometry=1){ ## nages <- afscOM::get_model_dimensions(dem_params$sel)$nages ## a <- cutoff_age-1 ## ssb <- apply(naa[,a:nages,1,]*(dem_params$waa[,a:nages,1,,drop=FALSE]^hyperallometry)*dem_params$mat[,a:nages,1,,drop=FALSE], 1, sum) ## return( ## npfmc_tier3_F(ssb, ref_pts$Bref, ref_pts$Fref) ## ) ## } ## ## $hcr$extra_pars ## [1] NA ## ## $hcr$extra_options ## $hcr$extra_options$max_stability ## [1] NA ## ## $hcr$extra_options$harvest_cap ## [1] NA ## ## ## $hcr$units ## [1] \"F\" ## ## ## $ref_points ## $ref_points$spr_target ## [1] 0.4 ## ## $ref_points$rp_start_age ## [1] 1 ## ## $ref_points$rp_hyperallometry ## [1] 1 ## ## ## $management ## $management$abc_tac_reduction ## [1] 1 ## ## $management$tac_land_reduction ## [1] 1 ## ## ## $survey_frequency ## [1] 1 ## ## $assessment_frequency ## [1] 1 ## ## $name ## [1] \"F40\" data(mp_f50) mp_f50 ## $hcr ## $hcr$func ## function(ref_pts, naa, dem_params, avgrec, cutoff_age=1, hyperallometry=1){ ## nages <- afscOM::get_model_dimensions(dem_params$sel)$nages ## a <- cutoff_age-1 ## ssb <- apply(naa[,a:nages,1,]*(dem_params$waa[,a:nages,1,,drop=FALSE]^hyperallometry)*dem_params$mat[,a:nages,1,,drop=FALSE], 1, sum) ## return( ## npfmc_tier3_F(ssb, ref_pts$Bref, ref_pts$Fref) ## ) ## } ## ## $hcr$extra_pars ## [1] NA ## ## $hcr$extra_options ## $hcr$extra_options$max_stability ## [1] NA ## ## $hcr$extra_options$harvest_cap ## [1] NA ## ## ## $hcr$units ## [1] \"F\" ## ## ## $ref_points ## $ref_points$spr_target ## [1] 0.5 0.5 ## ## $ref_points$rp_start_age ## [1] 1 ## ## $ref_points$rp_hyperallometry ## [1] 1 ## ## ## $management ## $management$abc_tac_reduction ## [1] 1 ## ## $management$tac_land_reduction ## [1] 1 ## ## ## $survey_frequency ## [1] 1 ## ## $assessment_frequency ## [1] 1 ## ## $name ## [1] \"F50\" data(mp_5perc) data(mp_25cap) mp_5perc ## $hcr ## $hcr$func ## function(ref_pts, naa, dem_params, avgrec, cutoff_age=1, hyperallometry=1){ ## nages <- afscOM::get_model_dimensions(dem_params$sel)$nages ## a <- cutoff_age-1 ## ssb <- apply(naa[,a:nages,1,]*(dem_params$waa[,a:nages,1,,drop=FALSE]^hyperallometry)*dem_params$mat[,a:nages,1,,drop=FALSE], 1, sum) ## return( ## npfmc_tier3_F(ssb, ref_pts$Bref, ref_pts$Fref) ## ) ## } ## ## $hcr$extra_pars ## [1] NA ## ## $hcr$extra_options ## $hcr$extra_options$max_stability ## [1] 0.05 ## ## $hcr$extra_options$harvest_cap ## [1] NA ## ## ## $hcr$units ## [1] \"F\" ## ## ## $ref_points ## $ref_points$spr_target ## [1] 0.4 ## ## $ref_points$rp_start_age ## [1] 1 ## ## $ref_points$rp_hyperallometry ## [1] 1 ## ## ## $management ## $management$abc_tac_reduction ## [1] 1 ## ## $management$tac_land_reduction ## [1] 1 ## ## ## $survey_frequency ## [1] 1 ## ## $assessment_frequency ## [1] 1 ## ## $name ## [1] \"F40 +/- 5%\" mp_25cap ## $hcr ## $hcr$func ## function(ref_pts, naa, dem_params, avgrec, cutoff_age=1, hyperallometry=1){ ## nages <- afscOM::get_model_dimensions(dem_params$sel)$nages ## a <- cutoff_age-1 ## ssb <- apply(naa[,a:nages,1,]*(dem_params$waa[,a:nages,1,,drop=FALSE]^hyperallometry)*dem_params$mat[,a:nages,1,,drop=FALSE], 1, sum) ## return( ## npfmc_tier3_F(ssb, ref_pts$Bref, ref_pts$Fref) ## ) ## } ## ## $hcr$extra_pars ## [1] NA ## ## $hcr$extra_options ## $hcr$extra_options$max_stability ## [1] NA ## ## $hcr$extra_options$harvest_cap ## [1] 25 ## ## ## $hcr$units ## [1] \"F\" ## ## ## $ref_points ## $ref_points$spr_target ## [1] 0.4 ## ## $ref_points$rp_start_age ## [1] 1 ## ## $ref_points$rp_hyperallometry ## [1] 1 ## ## ## $management ## $management$abc_tac_reduction ## [1] 1 ## ## $management$tac_land_reduction ## [1] 1 ## ## ## $survey_frequency ## [1] 1 ## ## $assessment_frequency ## [1] 1 ## ## $name ## [1] \"25k Harvest Cap\" hcr_list <- afscOM::listN( mp_f40, mp_f50, mp_5perc, mp_25cap )"},{"path":"/articles/00_sablefish_example.html","id":"defining-the-mse_options-object","dir":"Articles","previous_headings":"","what":"Defining the mse_options Object","title":"Sablefish MSE Example","text":"mse_options list object also defined provide additional options MSE function. Critically, list object defines: number years project , length OM conditioning period, simulation year begin projecting recruitment using provided recruitment function, whether estimation method run . default values appropriate case study, can accessed using setup_mse_options.","code":"mse_options_base <- setup_mse_options() mse_options <- mse_options_base mse_options$n_spinup_years <- 54 mse_options$recruitment_start_year <- 54 mse_options$n_proj_years <- 25 mse_options ## $n_proj_years ## [1] 25 ## ## $n_spinup_years ## [1] 54 ## ## $recruitment_start_year ## [1] 54 ## ## $run_estimation ## [1] TRUE mse_options_list <- afscOM::listN(mse_options)"},{"path":"/articles/00_sablefish_example.html","id":"running-the-mse","dir":"Articles","previous_headings":"","what":"Running the MSE","title":"Sablefish MSE Example","text":"Now OMs MPs appropriately defined, full set MSE simulation can run. run combination OM MP 20 random simulations parallel. parallel computing overhead handled internally MSE function uses 2 fewer available number compute cores machine. Depending number OMs, MPs, seeds, options, function may take several hours complete. relatively fast machine, >10 compute cores take ~2 hours complete simulations specified .","code":"nsims <- 20 seed_list <- sample(1:(1000*nsims), nsims) # Draw 20 random seeds model_runs <- run_mse_multiple( om_list, hcr_list, seed_list, nyears=100, mse_options_list=mse_options_list, diagnostics = TRUE, save=TRUE )"},{"path":"/articles/00_sablefish_example.html","id":"processing-mse-results","dir":"Articles","previous_headings":"","what":"Processing MSE Results","title":"Sablefish MSE Example","text":"MSE generate results 40 unique models (10 HCRs across 4 OMs), model consisting results 20 simulations, simulation lasted 75 years. amount output data often makes processing MSE results tricky. Multiple helper functions provided package make processing results easier. prcoessing output, create data.frame specifies models model_runs used combination OM MP object. Often can simply accomplished using expand.grid, used internally run_mse_multiple(). readability plotting purposes, often useful assign OM HCR human readable name order objects appear respective lists (om_list OMs hcr_list MPs). Five helper functions predefined facilitate working common outputs MSE: spawning biomass, fishing mortality, recruitment, ABC TAC, landed catch. function defined similarly, taking list MSE output objects (model_runs) data.frame OMs HCRs apply model (extra_columns). used internally function assign correct OM HCR name model, pull correct data MSE outputs. helper functions return tibbles long format can easily provided ggplot plotting used within tidyverse style data processing pipelines. plotting function also defined alongside data processing function , return ggplot object can modified outside function. plotting function, parameter v1 corresponds column name assigned “color” aesthetic, parameter v2 corresponds column names facet . Facetting multiple variables (e.g. facet grid) currently supported default.","code":"# Quick Way to get the names of the OMs and HCRs in the same order as they appear in the lists om_names <- unlist(lapply(om_list, \\(x) x$name)) hcr_names <- unlist(lapply(hcr_list, \\(x) x$name)) extra_columns <- expand.grid( om = om_names, hcr = hcr_names ) ssb_data <- get_ssb_biomass(model_runs, extra_columns, sable_om$dem_params, hcr_filter=hcr_names, om_filter=om_names) f_data <- get_fishing_mortalities(model_runs, extra_columns, hcr_filter=hcr_names, om_filter=om_names) abctac <- get_management_quantities(model_runs, extra_columns, spinup_years=mse_options$n_spinup_years, hcr_filter=hcr_names, om_filter=om_names) catch_data <- get_landed_catch(model_runs, extra_columns, hcr_filter=hcr_names, om_filter=om_names) common_trajectory <- mse_options$n_spinup_years # the number of years of historical data before the recruitment and HCR functions begin applying plot_ssb(ssb_data, v1=\"hcr\", v2=\"om\", common_trajectory=common_trajectory, show_est = FALSE) plot_fishing_mortalities(f_data, v1=\"hcr\", v2=\"om\", common_trajectory = common_trajectory, show_est=FALSE) plot_abc_tac(abctac, v1=\"hcr\", v2=\"om\", common_trajectory=common_trajectory) plot_landed_catch(catch_data, v1=\"hcr\", v2=\"om\", common_trajectory = common_trajectory)"},{"path":"/articles/00_sablefish_example.html","id":"computing-performance-metrics","dir":"Articles","previous_headings":"","what":"Computing Performance Metrics","title":"Sablefish MSE Example","text":"Helper functions also provided compute performance metrics. Individual functions performance metric available (though outputs may require additional processing), performance_metric_summary function can used quickly compute . Like data processing functions, default plotting functions performance metrics also available.","code":"perf_tradeoffs <- compute_performance_metric_summary( model_runs, extra_columns, sable_om$dem_params, ref_naa, hcr_filter=hcr_names, om_filter=om_names, interval_widths=c(0.50, 0.80), time_horizon = c(55, 130), extra_filter = NULL, relative=NULL, summarise_by=c(\"om\", \"hcr\"), summary_out = FALSE, metric_list = c(\"avg_catch\", \"avg_variation\", \"avg_ssb\", \"avg_age\", \"prop_years_lowssb\") ) perf_data <- performance_metrics$perf_data plot_performance_metric_summary(perf_data)"},{"path":"/articles/01_operating_model.html","id":"an-introduction-to-afscom","dir":"Articles","previous_headings":"","what":"An Introduction to afscOM","title":"Defining an Operating Model","text":"afscOM age-structured, multi-sex, multi-fleet, spatially explicit fisheries model can parameterized elicit range complex population dynamics. Users can define specific demographic parameters (e.g. natural mortality, weight--age, selectivity) change across time, age, sex, space, fleet, model internally projects population demographic characteristics forwards time. Observation processes can additionally defined allowing users simulate observations (associated error levels) population time step. information afscOM package, including examples additional documentation, please see package documentation.","code":""},{"path":"/articles/01_operating_model.html","id":"model-dimensions","dir":"Articles","previous_headings":"","what":"Model Dimensions","title":"Defining an Operating Model","text":"Demographic parameters defined using mutli-dimensional arrays afscOM. demographic parameter arrays dimensions: [nyears, nages, nsexes, nregions, nfleets] (demographic parameters, natural mortality, dont vary fleet can drop final dimension). : nyears - total number years model nages - number ages track nsexes - number sexes track nregions - number spatial regions track nfleets - number fishing fleets track nsurveys - number scientific surveys track afscOM package can simulate populations using combination dimensions, SablefishMSE package tested 30 ages, 2 sexes, 1 spatial region, 2 fishing fleets.","code":""},{"path":"/articles/01_operating_model.html","id":"demographic-parameters","dir":"Articles","previous_headings":"","what":"Demographic Parameters","title":"Defining an Operating Model","text":"multidimensional arrays define demographic rates MUST always follow dimension structure afscOM models work correctly. Biological parameters, natural mortality, maturity, weight--age array dimensions: [nyears, nages, nsexes, nregions]. Fishery survey fleet parameters, selectivity, retention, discard mortality, array dimensions: [nyears, nages, nsexes, nregions, nfleets] (fishing fleets) [nyears, nages, nsexes, nregions, nsurveys] (survey fleets). structure first index along “sex” dimension (dimension 3) correspond parameters females, second index correspond parameters males. Required population parameters include: mort: Natural mortality [nyears, nages, nsexes, nregions] mat: Maturity [nyears, nages, nsexes, nregions] waa: Weight--age [nyears, nages, nsexes, nregions] sexrat: Population sex ratio [nyears, nages, nsexes, nregions] sel: Fishery selectivity [nyears, nages, nsexes, nregions, nfleets] ret: Fishery retention [nyears, nages, nsexes, nregions, nfleets] dmr: Fishery discard mortality (instantaneous rate) [nyears, nages, nsexes, nregions, nfleets] observations simulated, survey selectivity must also specified: surv_sel: Survey selectivity [nyears, nages, nsexes, nregions, nsurveys] spatial models (nregions > 1), “movement” demographic matrix also required input. Movement can specified vary age sex, can currently vary time. movement: Movement matrix [nregions, nregions, nages, nsexes] additional infromation building demographic arrays, see afscOM documentation.","code":""},{"path":"/articles/01_operating_model.html","id":"observation-processes","dir":"Articles","previous_headings":"","what":"Observation Processes","title":"Defining an Operating Model","text":"afscOM capable optionally simulating observations (associated observation error) population timestep. Observation can simulated include: age compositions relative population number indices (population indices) relative population weight indices (biomass indices) landed catch volume simulate observations OM, om$model_options$simulae_observations = TRUE specified. Additionally, list observation parameters also needs defined. Required observation parameters include: Required items obs_pars list : is_survey: indicates whether given fleet fishing fleet survey fleet (0 indicates fishing fleet, 1 indicates scientific survey) qs: catchability coefficients rpn: whether generate relative population number (RPN) index (0 = , 1 = yes) rpw: whether generate relative population weight (RPW) index (0 = , 1 = yes) rpn_cv: coefficient variation (CV) use generating RPN observations rpw_cv: coefficient variation (CV) use generating RPW observations acs: whether generate age composition observations (0 = , 1 = yes) ac_samps: number samples use generating age composition observations ac_as_integers: whether age composition observations provided integers proportions (0 = , 1 = yes) acs_agg_sex: whether age composition observations aggregated sex (0 = , 1 = yes) required, used within wider MSE simulation loop, OM always parameterized yield observations, observation data available estimation method submodule MSE. types observations (RPN, RPW, age compositions, etc.) specified provided sable_om$model_options$obs_pars object retained used MSE simulation loop ensure compatibility estimation model.","code":""},{"path":"/articles/01_operating_model.html","id":"the-full-operating-model-object","dir":"Articles","previous_headings":"","what":"The Full Operating Model Object","title":"Defining an Operating Model","text":"fully parameterized OM object, sable_om, available SablefishMSE package. OM object contains full set demographic parameter matrices, observation process parameters, array initial numbers--age. provided sable_om object defines OM object compatible afscOM, however, additional component defines future recruitment simulated required use within MSE simulation loop. information specifying future recruitment, see Defining Recruitment Functions Page.","code":"sable_om <- readRDS(file.path(here::here(), \"data\", \"sablefish_om_big.RDS\")) sable_om$dem_params sable_om$model_options$obs_pars sable_om$init_naa"},{"path":"/articles/02_estimation_model.html","id":"recruitment-bias-ramp","dir":"Articles","previous_headings":"","what":"Recruitment Bias Ramp","title":"Sablefish MSE Estimation Method","text":"2023 operational stock assessment model updated include Methot Taylor (2013) recruitment bias correction ramp October/November 2023. order bring EM MSE line operational model, bias correction ramp integrated TMB model provided part SpatialSablefishAssessment package. Recruitment variation (\\(\\sigma_R\\)) remains fixed parameter EM (maximum level, \\(\\sigma_R = 1.04\\)).","code":""},{"path":"/articles/02_estimation_model.html","id":"sex-disaggregated-age-compositions","dir":"Articles","previous_headings":"","what":"Sex-disaggregated Age Compositions","title":"Sablefish MSE Estimation Method","text":"order better estimate sex-specific selectivity curves within EM, model updated fit sex-disaggregated age composition data “proportions across approach”. different SpatialSablefishAssessment model operational assessment model, fit sex-aggregated age composition data.","code":""},{"path":"/articles/02_estimation_model.html","id":"additional-notes-about-the-em","dir":"Articles","previous_headings":"","what":"Additional Notes About the EM","title":"Sablefish MSE Estimation Method","text":"EM known struggle accurately identifying population scale, often trouble correctly re-estimating survey catchability coefficients. counter problem, strong prior placed coefficient Alaska longline NOAA trawl survey indices abundance. estimate catchability coefficient operational assessment used mean respective priors. Prior standard deviations constrained 2% mean. EM minimally biased regards SSB fully-selected F, persists ~7% negative bias average recruitment estimates. believed due fact EM constrain recriutment deviations sum zero across timeseries (sum--zero constraint), done operational assessment used parameterize OM.","code":""},{"path":"/articles/02_estimation_model.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Sablefish MSE Estimation Method","text":"Goethel, D.R., Cheng, M.L.H., Echave, K.B., Marsh, C., Rodgveller, C.J., Shotwell, K., Siwicke, K., 2023. Stock Assessment sablefish stock Alaska. North Pacific Fisheries Management Council, Anchorage, AK. Methot, R.D., Taylor, .G., 2011. Adjusting bias due variability estimated recruitments fishery assessment models. Can. J. Fish. Aquat. Sci. 68, 1744–1760. https://doi.org/10.1139/f2011-092","code":""},{"path":"/articles/02_recruitment.html","id":"the-recruitment-object","dir":"Articles","previous_headings":"","what":"The Recruitment Object","title":"Specifying Recruitment","text":"recruitment list object requires two components: (1) reference R function specifies future recruitment generated, (2) list parameters values pass said function. simple case (example ), future recruitment generated recruit_func function, simply returns recruitment “10” next 100 years. Recruitment functions can complicated necessary, can also make use annual population state variables, spawning biomass. Examples complex recruitment functions available end page.","code":"recruit_func <- function(nyears){ return(rep(10, nyears)) } recruitment_obj <- list( # function from which to generate future recruitment events func = recruit_func, # extra parameters to pass to `func` pars = list( nyears = 100 ) ) om$recruitment <- recruitment_obj"},{"path":"/articles/02_recruitment.html","id":"provided-recruitment-functions","dir":"Articles","previous_headings":"","what":"Provided Recruitment Functions","title":"Specifying Recruitment","text":"Five generic recruitment functions provided part SablefishMSE package. cover four common ways simulate future fisheries recruitment.","code":""},{"path":"/articles/02_recruitment.html","id":"resample-recruitment","dir":"Articles","previous_headings":"Provided Recruitment Functions","what":"Resample Recruitment","title":"Specifying Recruitment","text":"first provided recruitment function generates future recruitment resampling vector provided values. often, vector resampled vector historical recruitment events, can also include values.","code":"om$recruitment$func <- resample_recruits om$recruitment$pars <- list( # vector of values to resample from hist_recruits = hist_recruits, # number of years to generate future recruitment for nyears = nyears )"},{"path":"/articles/02_recruitment.html","id":"beverton-holt-recruitment","dir":"Articles","previous_headings":"Provided Recruitment Functions","what":"Beverton-Holt Recruitment","title":"Specifying Recruitment","text":"second provided recruitment function generates future recruitment via Beverton-Holt stock recruitment relationship (Beverton Holt, 1957), parameterized using steepness. Beverton-Holt function defined : \\(R_y = \\frac{4hR_0\\text{SSB}_{y-1}}{(1-h)S_0 + (5h-1)\\text{SSB}_{y-1}}\\) \\(h\\) steepness, \\(S_0\\) unfished spawning biomass, \\(R_0\\) unfished recruitment, \\(\\text{SSB}\\) current spawning stock biomass. Lognormally distributed deviations base stock recruit relationship, recruitment variation \\(\\sigma_R = 1.20\\), also applied. Annual spawning biomass (SSB) passed underlying beverton_holt function automatically inside MSE simulation loop.","code":"om$recruitment$func <- beverton_holt om$recruitment$pars <- list( h = 0.85, # steepness R0 = 15, # unfished recruitment S0 = 300, # unfished spawning biomass sigR = 1.20 # recruitment variability )"},{"path":"/articles/02_recruitment.html","id":"regime-recruitment","dir":"Articles","previous_headings":"Provided Recruitment Functions","what":"Regime Recruitment","title":"Specifying Recruitment","text":"third fourth provided recruitment functions generate future recruitment distinct alternating regimes. Users ability control length, order, relative strength two regimes. first regime recruitment function works similarly simpler resample_recruits function resamples distinct vectors values depending regime active. second regime recruitment function works parameterizing two separate Beverton-Holt stock recruit relationships, differing value unfished recruitment (\\(R_0\\)).","code":"om$recruitment$func <- resample_regime_recruits om$recruitment$pars <- list( # Vector of recruits to resample from in regime 1 regime1_recruits = seq(1, 25, 1)], # Vector of recruits to resample from in regime 2 regime2_recruits = seq(60, 100, 10), # Total number of years to generate future recruitment for nyears = nyears, # Lengths of each regime regime_length = c(20, 5), # Start with the first regime starting_regime = 0 ) om$recruitment$func <- bevholt_regimes om$recruitment$pars <- list( # steepness h = 0.85, # spawning biomass per recruit (to calculate regime specific S0) sbpr = 20, # Regime specfic R0 R0 = c(12.5, 50), # Regime specific recruitment variability sigR = c(1.20, 1.20), # Total number of years to generate future recruitment for nyears = nyears, # Lengths of each regime regime_length = c(20, 5), # Start with first regim starting_regime = 0 )"},{"path":"/articles/02_recruitment.html","id":"crash-recruitment","dir":"Articles","previous_headings":"Provided Recruitment Functions","what":"Crash Recruitment","title":"Specifying Recruitment","text":"final provided recruitment function generates future recruitment resampling, “Resample Recruitment” option, defined period recruitment different. different period can used simulate period depressed recruitment (e.g. recruitment crash) period amplified recruitment (e.g. recruitment boom), depending parameterized. Users can specify simulation year alternative recruitment period begins, length period, mean value recruitment period. alternative recruitment period, lognormal deviations specified mean recruitment applied using \\(\\text{CV}=0.1\\).","code":"om$recruitment$func <- recruits_crash om$recruitment$pars <- list( # Start a crash period in simulation years 1 crash_start_year = 1, # 20-year crash period crash_length = 20, # Use minimum historical recruitment as average crash recruitment level crash_value = min(hist_recruits), # recruitment vector to resample from outside of the \"crash period\" hist_recruits = hist_recruits, # Total number of years to generte future recruitment for nyears = nyears )"},{"path":[]},{"path":"/articles/02_recruitment.html","id":"required-parameters","dir":"Articles","previous_headings":"Custom Recruitment Functions","what":"Required Parameters","title":"Specifying Recruitment","text":"required parameter custom recruitment functions seed parameter, corresponding random seed. used ensure future recruitment vectors reproducible across simulations. Note seed parameter required input function, need specified recruitment$pars list object. Instead, MSE simulation loop automatically pass appropriate seed value recruitment function internally.","code":""},{"path":"/articles/02_recruitment.html","id":"state-independent-recruitment-functions","dir":"Articles","previous_headings":"Custom Recruitment Functions","what":"State-Independent Recruitment Functions","title":"Specifying Recruitment","text":"State-independent recruitment functions require knowledge current state population generate future recruitments. functions benefit able generate future recruitment events entering simulation loop. resample_recruitment crash_recruitment functions examples state-independent recruitment functions. extension provided resample_recruits functions, provide following example. , future recruitment randomly resampled vector historical recruitment events, weights applied, creating new vector recruitment next 100 years.","code":"weighted_resample_recruitment <- function(hist_recruits, nyears, weights, seed){ set.seed(seed) r <- sample(hist_recruits, nyears, replace=TRUE, prob=weights) return(r) } recruitment_obj <- list( # function from which to generate future recruitment events func = recruit_func, # extra parameters to pass to `func` pars = list( hist_recruits = seq(1, 100, 5) nyears = 100, weights = c(rep(0.025, 10), rep(0.05, 10)) ) ) om$recruitment <- recruitment_obj"},{"path":"/articles/02_recruitment.html","id":"state-dependent-recruitment-functions","dir":"Articles","previous_headings":"Custom Recruitment Functions","what":"State-Dependent Recruitment Functions","title":"Specifying Recruitment","text":"State-dependent recruitment functions require knowledge current state population appropriately generate future recruitment. types recruitment functions commonly require knowledge annual SSB parameterize stock-recruit relationship, Beverton-Holt Ricker curves. provided beverton_holt bevholt_regimes functions good examples state-dependent recruitment functions. primary difference defining state-dependent state-independent recruitment functions state-dependent functions must written “function factory”. Function factories functions parameterize, return reference , another function. , function factory used parameter values stock recruit relationship can defined user external simulation loop, model can calculate annual SSB internally pass along output function factory. example creating new Beverton-Holt style stock recruit relationship, time parameterized using \\(\\alpha\\) \\(\\beta\\): MSE simulation loop handle calculating annual SSB passing value function factory internally. Note lack variability around stock-recruit relationship example. state-dependent recruitment functions, recruitment stochasticity calculated applied separately MSE simulation loop. Annual recruitment deviations distributed \\(~\\mathcal{N}(0, \\sigma_R)\\) applied multiplicatively output function.","code":"beverton_holt_ab <- function(a, b, seed){ set.seed(seed) function(ssb, y){ bh <- (a*ssb)/(1+b*ssb) return(bh) } } recruitment_obj <- list( # reference to the beverton_holt_ab function above func = beverton_holt_ab, # parameter values for 'a', and 'b' pars = list( a = 10 b = 5 ) ) om$recruitment <- recruitment_obj"},{"path":"/articles/03_estimation_model.html","id":"recruitment-bias-ramp","dir":"Articles","previous_headings":"","what":"Recruitment Bias Ramp","title":"Estimation Method","text":"2023 operational stock assessment model updated include Methot Taylor (2013) recruitment bias correction ramp October/November 2023. order bring EM MSE line operational model, bias correction ramp integrated TMB model provided part SpatialSablefishAssessment package. Recruitment variation (\\(\\sigma_R\\)) remains fixed parameter EM (maximum level, \\(\\sigma_R = 1.04\\)).","code":""},{"path":"/articles/03_estimation_model.html","id":"sex-disaggregated-age-compositions","dir":"Articles","previous_headings":"","what":"Sex-disaggregated Age Compositions","title":"Estimation Method","text":"order better estimate sex-specific selectivity curves within EM, model updated fit sex-disaggregated age composition data “proportions across approach”. different SpatialSablefishAssessment model operational assessment model, fit sex-aggregated age composition data.","code":""},{"path":"/articles/03_estimation_model.html","id":"additional-notes-about-the-em","dir":"Articles","previous_headings":"","what":"Additional Notes About the EM","title":"Estimation Method","text":"EM known struggle accurately identifying population scale, often trouble correctly re-estimating survey catchability coefficients. counter problem, strong prior placed coefficient Alaska longline NOAA trawl survey indices abundance. estimate catchability coefficient operational assessment used mean respective priors. Prior standard deviations constrained 2% mean. EM minimally biased regards SSB fully-selected F, persists ~7% negative bias average recruitment estimates. believed due fact EM constrain recriutment deviations sum zero across timeseries (sum--zero constraint), done operational assessment used parameterize OM.","code":""},{"path":"/articles/03_estimation_model.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Estimation Method","text":"Goethel, D.R., Cheng, M.L.H., Echave, K.B., Marsh, C., Rodgveller, C.J., Shotwell, K., Siwicke, K., 2023. Stock Assessment sablefish stock Alaska. North Pacific Fisheries Management Council, Anchorage, AK. Methot, R.D., Taylor, .G., 2011. Adjusting bias due variability estimated recruitments fishery assessment models. Can. J. Fish. Aquat. Sci. 68, 1744–1760. https://doi.org/10.1139/f2011-092","code":""},{"path":"/articles/03_recruitment_functions.html","id":"working-with-existing-recruitment-functions","dir":"Articles","previous_headings":"","what":"Working with Existing Recruitment functions","title":"Specifying Recruitment","text":"Four recruitment functions come pre-packaged repository: resample_recruits - randomly resample known recruitment timeseries resample_regime_recruits - randomly resample recruits form known recruitment timeseries pre-defined regimes regime_recruits - randonly draw recruitment regime-specific distributions beverton_holt - Beverton-Holt stock recruit relationships, parameterized steepness first three functions function way example , users simple provide function name, named parameter list (without final seed parameter). beverton_holt function works differently however, due specifying state-dependent recruitment function. function R function factory (funtion returns another function), accepts standard Beverton-Holt parameters – h, R0, S0 – returns back new function SSB provided input (see example ). function factory can used nearly exactly way previous three recruitment functions: Like recruitment functions, final “seed” parameter provided input recruitmemt$pars list. MSE internally handle computing SSB beginning year using defined SRR generate annual recruitment level.","code":"beverton_holt <- function(h, R0, S0, sigR, seed){ # note that the set.seed() call needs to happen # outside of the returned function, or else there # will be no random variability in recruitment draws set.seed(seed) function(ssb){ bh <- (4*R0*h*ssb)/((1-h)*R0*(S0/R0) + (5*h - 1)*ssb) return( bh + exp(rnorm(1, mean=0, sd=sigR)) # lognormal deviates ) } } bevholt <- beverton_holt(h=0.7, R0=25, S0=300, sigR=1, seed=1120) bevholt(ssb=50) # 16.65 ## [1] 17.74222 om$recruitment$func <- beverton_holt om$recruitment$pars <- list( h=0.70, R0=25, S0=300, sigR=1 )"},{"path":"/articles/03_recruitment_functions.html","id":"defining-custom-recruitment-functions","dir":"Articles","previous_headings":"","what":"Defining Custom Recruitment Functions","title":"Specifying Recruitment","text":"Users can, optionally, define recruitment functions beyond comes pre-packaged MSE. two types recruitment functions can developed: state-dependent (Beverton-Holt), state-dependent (recruitment regime functions). State-independent recruitment functions useful property entire recruitment timeseries can defined MSE simulation starts (helpful guaranteeing reproducability model runs), state-depenedent functions realized start simulation year. possible, recommend defining state-independent recruitment functions. R function defines custom recruitment function, regardless type, can take form needs important caveat final function pararmeter must called “seed” represent random seed (holds even custom recruitment functions completely deterministic). example recruitment function random pulls recruitment lognormal distribution: example “state-independent” recruitment function. function takes mean recruitment level (log space) recruitment variation computes nyears random recruitment levels. Nearly state-independent recruitment functions need accept nyears parameter order generate correct number recruitment events. Similarly, like recruitment functions, final parameter defines random seed.","code":"random_lognormal <- function(log_mean_rec, sigR, nyears, seed){ set.seed(seed) return(exp(log_mean_rec + rnorm(nyears, 0, sigR) - 0.5*sigR^2)) } random_lognormal(log_mean_rec = log(25), sigR = 1.04, nyears = 5, seed = 1007) # 25.022 19.746 55.721 14.737 5.858"},{"path":"/articles/04_harvest_control_rule_function.html","id":"defining-the-management-procedure-object","dir":"Articles","previous_headings":"","what":"Defining the Management Procedure Object","title":"Harvest Control Rules","text":"combination stock assessment method, harvest control rule, management implementation process known “management procedure”. run_mse(...) function, associated wrapper functions, require input list object defines management procedure. “MP” list objects take folowing form: Required elements MP objects include: hcr$func: reference R function defines harvest control rule hcr$extra_pars: list additional parameter values required HCR function. values must provided runtime can dynamically calculated based internal state variables. hcr$units: output units HCR function (either “F” “TAC”). “TAC”, run_mse function compute corresponding F result output TAC hcr$extra_options$max_stability: maximum permissable annual change TACs proportion. NA (default), change TAC betwen successive years allowed. hcr$extra_options$harvest_cap: maximum permissable TAC. NA (default), TAC, computed HCR function allowed, otherwise, HCR computed TACs exceed value, capped back value specified. ref_points$spr_target: target SPR level SPR-based reference points management$abc_tac_reduction: proportion ABC set TAC . HCR functions used compute ABC (Acceptable Biological Catch), maximum permissable TAC, TACs often set lower ABC. parameter captures reduction level. Default value 1. management$tac_land_reduction: proportion TAC set following years realized landings . use entire TAC utilized fishery. Default value 1. abc_tac_reduction tac_land_reduction can, optionally, also calculated internally based provided function list parameters. example calculate annual tac_land_reduction using “stairstep_attainment” function associated parameter values. default mp object can generated setup_mp_options() function. Default MP objects HCR element defined. HCR objects must defined user inserted mp object. list object supplied input run_mse(...) function associated wrapper functions, like: run_mse(..., hcr=mp_obj, ...).","code":"mp <- list( hcr = list( func = hcr_func, # the HCR function to evaluate extra_pars = NA, # any additional parameter values that are needed by the HCR function extra_options = list( max_stability = NA, # a maximum permissable annual change in TACs (as a proportion) harvest_cap = NA # a maximum permissable annual TAC ), units = \"F\" # the output units of the HCR function (should usually be \"F\" or \"TAC\") ) ref_points = list( spr_target = 0.40 # the target SPR level for SPR-based reference points ), management = list( abc_tac_reduction = 1, # proportion of the ABC to set the TAC too tac_land_reduction = 1 # proprtion of the TAC to set realized landings too ) ) mp$management$tac_land_reduction <- list( func = stairstep_attainment, pars = list( breakpoints = c(20, 30), levels = c(0.9, 0.8, 0.6), phase_ins = 0 ) )"},{"path":"/articles/04_harvest_control_rule_function.html","id":"constructing-a-new-hcr-function","dir":"Articles","previous_headings":"","what":"Constructing a New HCR Function","title":"Harvest Control Rules","text":", show construct new step-wise harvest control rule function, F=0.10 SSB > 100,000 tons, F=0.01 SSB <= 100,000 tons. HCR function (step_hcr) takes three required parameters inputs, though makes use naa dem_params (users write function take three parameters inputs, MSE function fail attempting evaluate HCR function).","code":"step_hcr <- function(ref_pts, naa, dem_params){ # Calculate ssb as naa*waa*mat (female only) in units of 1,000s tons ssb <- apply(naa[,,1,]*dem_params$waa[,,1,,drop=FALSE]*dem_params$mat[,,1,,drop=FALSE], 1, sum) return(ifelse(ssb > 100, 0.10, 0.01)) } hcr <- list( func = step_hcr, # the HCR function to evaluate extra_pars = NA, # no extra parameter needed extra_options = list( max_stability = NA, # no stability constraints harvest_cap = NA # no harvest caps ), units = \"F\" ) mp <- setup_mp_options() mp$hcr <- hcr mse <- run_mse(om=om, hcr=hcr, nyears_input=100)"},{"path":"/articles/04_harvest_control_rule_function.html","id":"constructing-more-complex-hcr-functions","dir":"Articles","previous_headings":"","what":"Constructing More Complex HCR Functions","title":"Harvest Control Rules","text":"HCRs require information just three required parameters defined. example, consider HCR wants dynamically reduce maximum F applied threshold HCR based average age population given year. HCR can defined like : avgeage_threshold_f HCR function accepts two parameters (ref_naa ages) required HCR functions. values parameters placed hcr$extra_pars list element required defining HCR object. , example, final MSE call look something like: pattern extends HCR function, even ones require dozens additional parameters (parameter names still need unique, paramaters names likes om, hcr, ref_pts, naa, etc. already used either calling MSE function default parameters alredy supplued HCR function.","code":"average_age <- function(naa, ages){ return(weighted.mean(ages, naa)) } avgage_threshold_f <- function(ref_pts, naa, dem_params, ref_naa, ages){ # Calculate ssb as naa*waa*mat (female only) in units of 1,000s tons ssb <- apply(naa[,,1,]*dem_params$waa[,,1,,drop=FALSE]*dem_params$mat[,,1,,drop=FALSE], 1, sum) as_stat <- average_age(naa, ages)/average_age(ref_naa, ages) as_scalar <- threshold_f(as_stat, f_min=0, f_max=1, lrp=0, urp=1) x <- ssb/ref_pts$B40 f_max <- ref_pts$F40*as_scalar f_min <- 0 lrp <- 0 urp <- 1 if(x >= urp) F <- f_max # if stock status >= 1 if(x > lrp && x < urp) F <- f_max * ((x-lrp)/(urp-lrp)) # if stock status > alpha & stock status < 1 if(x <= lrp) F <- f_min return(f) } ages <- 2:31 ref_naa <- 25*sapply(1:30, \\(i) 1*(exp(-0.1))^i) hcr <- list( func = avgage_threshold_f, # the HCR function to evaluate extra_pars = list( # extra parameter values required by the \"avgage_threshold_f function\" ref_naa = ref_naa, ages = age ), extra_options = list( max_stability = NA, # a maximum permissable annual change in TACs (as a proportion) harvest_cap = NA # a maximum permissable annual TAC ), units = \"F\" ) mp <- setup_mp_options() mp$hcr <- hcr mse <- run_mse(om=om, hcr=mp, nyears_input=100)"},{"path":"/articles/04_harvest_control_rule_function.html","id":"additional-hcr-complexity","dir":"Articles","previous_headings":"","what":"Additional HCR Complexity","title":"Harvest Control Rules","text":"HCRs can also additional “meta-rules” define behavior. common example stability constraints, limit much annual catch levels allowed change years. constraints defined extra_options list object within larged HCR object definition. supply additional management rules, stability constraints harvest caps, named list extra_options must added larger hcr list object. extra_options list object, can, presently, define two parameters: NOTE: interface defining complex HCR functions defining additional management meta-rules subject change (07/22/2024).","code":"hcr$extra_options = list( max_stability = 0.15, # maximum allowed percent increase in TAC between successive years harvest_cap = 100000 # maximum allowed TAC )"},{"path":"/articles/04_management_procedure.html","id":"defining-a-harvest-control-rule","dir":"Articles","previous_headings":"","what":"Defining a Harvest Control Rule","title":"Defining a Management Procedure","text":"harvest control rule (HCR) defines maximum catch can taken population following annual timestep. HCRs can range simple constant catch rules (catch taken every year) complex threshold functions scale allowable catch based stock status relative one reference points. HCR defined complex list object four parameters: func - R function defines functional form HCR extra_pars - named list additional parameter values required func (see section “Custom Harvest Control Rule Functions”) extra_options - named list additional HCR options (currently stability constraints harvest caps supported) units - output units func (either “F” HCR defined fishing mortality units “TAC” defined catch units) example defines NPFMC Tier 3 Groundfish HCR used manage sablefish Alaska: max_stability option allows constraining maximum allowable annual change catch recommendations HCR. Values range 0-1. constraint always applied recommended catch even HCR function output fishing mortality units. harvest_cap option allows constraining allowable catch maximum value, even catch recommendation HCR higher. Values interpreted units 1000s mt.","code":"tier3 <- function(ref_pts, naa, dem_params, avgrec, cutoff_age=1){ nages <- afscOM::get_model_dimensions(dem_params$sel)$nages a <- cutoff_age-1 ssb <- apply(naa[,a:nages,1,]*dem_params$waa[,a:nages,1,,drop=FALSE]*dem_params$mat[,a:nages,1,,drop=FALSE], 1, sum) return( npfmc_tier3_F(ssb, ref_pts$Bref, ref_pts$Fref) ) } hcr_obj <- list( # R function defining HCR func = tier3, # No extra parameters required extra_pars = NA, # No stability constraints or harvest caps extra_options = list( max_stability = NA, harvest_cap = NA ), # `func` outputs in fishing mortality units units = \"F\" )"},{"path":"/articles/04_management_procedure.html","id":"existing-harvest-control-rule-functions","dir":"Articles","previous_headings":"Defining a Harvest Control Rule","what":"Existing Harvest Control Rule Functions","title":"Defining a Management Procedure","text":"Several MP/HCR objects provided SablefishMSE package: mp_f40 - threshold HCR using F40/B40 reference points. current HCR used managed sablefish Alaska. mp_5perc - mp_f40 HCR stability constraint 5% mp_25cap - mp_f40 HCR maximum harvest cap 25,000mt.","code":""},{"path":"/articles/04_management_procedure.html","id":"custom-harvest-control-rule-functions","dir":"Articles","previous_headings":"Defining a Harvest Control Rule","what":"Custom Harvest Control Rule Functions","title":"Defining a Management Procedure","text":"Custom HCR functions can easily developed used within MSE simulation loop. HCR functions must accept, minimum, four function arguments: ref_pts - list object containing computed values reference points (see next section “Defining Reference Point Object”) naa - array numbers--age (dimension [1, nages, nsexes, nregions]) dem_params - list demographic parameters (dimension [1, nages, nsexes, nregion, nfleets]) avgrec - average recruitment across simulation four arguments must accepted custom HCR function, even used. Additional arguments can also accepted, values specified hcr$extra_pars list (four arguments listed need specified extra_pars list, passed HCR function automatically within MSE simulation loop). Note custom HCR functions CAN make use internal state variables MSE except numbers--age. example custom HCR recommends fishing mortality 10% \\(\\text{SSB} >= 100,000\\)mt fishing mortality 1% \\(\\text{SSB} < 100,000\\)mt. Another example custom HCR function accepts additional arguments:","code":"# the four required function arguemnts are present step_hcr <- function(ref_pts, naa, dem_params, avgrec){ # Calculate ssb as naa*waa*mat (female only) in units of 1,000s tons ssb <- apply(naa[,,1,]*dem_params$waa[,,1,,drop=FALSE]*dem_params$mat[,,1,,drop=FALSE], 1, sum) return(ifelse(ssb > 100, 0.10, 0.01)) } hcr <- list( func = step_hcr, # the HCR function to evaluate extra_pars = NA, # no extra parameters needed extra_options = list( max_stability = NA, # no stability constraints harvest_cap = NA # no harvest caps ), units = \"F\" ) mp <- setup_mp_options() mp$hcr <- hcr average_age <- function(naa, ages){ return(weighted.mean(ages, naa)) } # The maximum fishing mortality rate in a threshold HCR is a function of the average age of the population relative to a reference average age. If the average age is above the reference average age, the maximum fishing mortality rate is not increased, but if the average age is below the reference average age, the maximum fishing mortality rate is reduced proportionately to how much lower the average age is relative to the reference average age. avgage_threshold_f <- function(ref_pts, naa, dem_params, ref_naa, ages){ # Calculate ssb as naa*waa*mat (female only) in units of 1,000s tons ssb <- apply(naa[,,1,]*dem_params$waa[,,1,,drop=FALSE]*dem_params$mat[,,1,,drop=FALSE], 1, sum) as_stat <- average_age(naa, ages)/average_age(ref_naa, ages) as_scalar <- ifelse(as_stat > 1, 1, as_stat) # if average age is above the reference average age, do not increase F x <- ssb/ref_pts$Bref f_max <- ref_pts$Fref*as_scalar f_min <- 0 lrp <- 0 urp <- 1 if(x >= urp) F <- f_max # if stock status >= 1 if(x > lrp && x < urp) F <- f_max * ((x-lrp)/(urp-lrp)) # if stock status > alpha & stock status < 1 if(x <= lrp) F <- f_min return(f) } hcr <- list( # the HCR function to evaluate func = avgage_threshold_f, # values of additional arguments required by the \"avgage_threshold_f\" function extra_pars = list( ref_naa = c(100, 75, 50, 25, 10), ages = 1:5 ), extra_options = list( max_stability = NA harvest_cap = NA ), units = \"F\" ) mp <- setup_mp_options() mp$hcr <- hcr"},{"path":"/articles/04_management_procedure.html","id":"defining-a-reference-point-object","dir":"Articles","previous_headings":"","what":"Defining a Reference Point Object","title":"Defining a Management Procedure","text":"SablefishMSE calculates annual reference points using spawning potential ratio (SPR) methods. target SPR level can set mp$ref_pts$spr_target parameter. parameter can either single value, vector two values. two values supplied, first value corresponds fishing mortality reference point second value corresponds biological reference point. MSE simulation loop reference point function, calculate_ref_points, computes returns 4 values: Fmax - maximum permissible fishing mortality rate corresponding fishing mortality yields \\(\\text{SPR}=0.35\\). Fref - fishing mortality rate yields \\(\\text{SPR}=\\text{spr_target}\\) Bref - spawning biomass resulting fishing Fref B0 - spawning biomass resulting fishing F=0.0 two biological reference points, Bref B0 calculated using average recruitment across entire simulation. Two additional options can specified mp$ref_pts object: rp_start_age - age individuals start contributing reference point calculations. default, rp_start_age=1, age classes contribute reference point calculation. rp_hyperallometry - hyperallometric scaling exponent applied weight--age within reference point calculation. functionally converts reference points terms spawning output (egg production) opposed biomass, approximating non-isometric fecundity relationship (whereby \\(\\text{Fecundity} \\propto \\text{Weight}^{\\beta}\\)). Default, rp_hyperallometry=1, inidcating isometric relationship ebtween weight fecundity.","code":""},{"path":"/articles/04_management_procedure.html","id":"defining-a-management-object","dir":"Articles","previous_headings":"","what":"Defining a Management Object","title":"Defining a Management Procedure","text":"SablefishMSE applies HCR functions level Acceptable Biological Catch (ABC), consistent North Pacific Fisheries Management Council utilizes HCRs manage groundfish fisheries Alaska. Total Allowable Catch (TAC), management quantity constrains maximum catch can removed population annually, subsequently constrained \\(\\text{TAC} <= \\text{ABC}\\). Finally, landed catch constrained \\(\\text{Catch} <= \\text{TAC}\\), reflect entire TAC taken every year. amount ABC reduced yield TAC, amount TAC reduced yield annual catch, customizable mp$management object. mp$management$abc_tac_reduction - multiplicative factor reflecting proportion ABC set TAC . mp$management$tac_land_reduction - multiplicative factor reflecting proportion TAC set annual landings . otherwise known “attainment”. abc_tac_reduction tac_land_reduction parameters , default, set 1, \\(\\text{ABC} = \\text{TAC} = \\text{Catch}\\). set single value, multiplicative factor applied every year simulation.","code":""},{"path":"/articles/04_management_procedure.html","id":"order-of-operations-for-management-module","dir":"Articles","previous_headings":"Defining a Management Object","what":"Order of Operations for Management Module","title":"Defining a Management Procedure","text":"management module handles calculating reference points, applying HCR function, calculating ABC, eventually outputting catch level following years OM timestep, exact order operations follow: Calculate SPR based reference points (Fmax, Fref, Bref, B0) using average recruitment across entire simulation numbers--age current year simulation. Apply HCR function calculate recommended fishing mortality rate catch level following year simulation. F_\\text{ABC}. HCR function outputs fishing mortality units, calculate corresponding catch level using Baranov catch equation. \\(\\text{ABC}\\). Apply stability constraints ABC specified mp$hcr$extra_options list. Apply abc_tac_reduction calculate \\(\\text{TAC}\\) following year simulation. Apply harvest caps constraints TAC specified mp$hcr$extra_options list. Apply tac_land_reduction calculate level realized landings following year simulation.","code":""},{"path":"/articles/04_management_procedure.html","id":"survey-and-assessment-frequency","dir":"Articles","previous_headings":"","what":"Survey and Assessment Frequency","title":"Defining a Management Procedure","text":"frequency scientific survey data generated made available estimation method controllable mp$survey_frequency parameter. frequency stock assessments performed used update reference points HCR recommendations controllable mp$assessment_frequency parameter. parameters set single integer value, indicating number years surveys assessments, respectively. default, parameters set 1, surveys assessments occur every year simulation.","code":""},{"path":"/articles/05_processing_mse_results.html","id":"bind_mse_results","dir":"Articles","previous_headings":"","what":"bind_mse_results","title":"Processing MSE Results","text":"function bind_mse_results(model_runs, var, extra_columns) takes list completed MSE simulation objects, vector variable names (characters), named list additional columns, returns dataframe long-format. intended used : resulting object data frame least six columns: time age sex region value L1 Note “L1” column contain name variable piece data (“value”) associated . example, “L1” column “naa”. extra_columns specified, additional columns appended end dataframe. mse object(s) model_runs contain results multiple somulations, “sim” column also part dataframe. combination output variables can supplied part “vars” parameter vector, though resulting dataframe may contain NA entries mixing variables defined “-age” (e.g. numbers--age F--age), variables defined annualy (e.g. TAC recommended F HCR function). , users may interact MSE outputs standard R dataframe commands, via typical tidyverse functions.","code":"mse1 <- run_mse(om, hcr, mse_options, nyears_input=100) model_runs <- list(mse1) extra_columns <- list(om=\"hcr1\") vars <- c(\"naa\") results <- bind_mse_outputs(model_runs, vars, extra_columns)"},{"path":"/articles/05_processing_mse_results.html","id":"how-to-use-the-extra_columns-parameter","dir":"Articles","previous_headings":"","what":"How to Use the extra_columns Parameter","title":"Processing MSE Results","text":"extra_columns parameter doesn’t make lot sense example, single MSE object processed. However, case multiple MSE objects, different combinations OMs HCRs processed simultaneously, users need way differentiate data belongs MSE simualtions. extra_columns parameter provides means users explicitly identfiy MSE simulations. example, four MSE simulations, spanning two OMs two HCR functions, processed together (presumably comparing performance different HCRs across OMs later ). extra_columns list defines two additional columns, “om” “hcr” (names list), added resulting output dataframe. values list obect vectors length model_runs object.","code":"mse1 <- run_mse(om1, hcr1, mse_options, nyears_input=100) mse2 <- run_mse(om1, hcr2, mse_options, nyears_input=100) mse3 <- run_mse(om2, hcr1, mse_options, nyears_input=100) mse4 <- run_mse(om2, hcr2, mse_options, nyears_input=100) model_runs <- list(mse1, mse2, mse3, mse4) extra_columns <- list( om = rep(c(\"om1\", \"om2\"), each=2), hcr = rep(c(\"hcr1\", \"hcr2\"), 2) ) vars <- c(\"naa\") results <- bind_mse_outputs(model_runs, vars, extra_columns)"},{"path":"/articles/05_processing_mse_results.html","id":"additional-helper-functions","dir":"Articles","previous_headings":"","what":"Additional Helper Functions","title":"Processing MSE Results","text":"Three helper functions provided quickly computing common derived quantities: get_ssb_biomass() - computes spawning biomass total biomass true estimated numbers--age matrices get_fishing_mortalities() - computes fully selected fishing mortality fleet jointly across fleets true estimated F--age matrices get_recruits() - computed annual recruitment true estimated numbers--age matrices resulting tibble function remains long format appropriately columns retained. plotting, additional processing likely needed. NOTE: Additional helper functions likely added throughout lifecycle package streamline common calculations. get_landings() function development allow simplified processing landings data.","code":""},{"path":"/articles/05_running_mse.html","id":"mse-options","dir":"Articles","previous_headings":"","what":"MSE Options","title":"Running the MSE","text":"list MSE options must defined control internal aspects MSE simulation loop, primarily long run MSE . MSE options object requires following inputs: n_proj_years - number projection years run MSE . number years specified management procedure applied. n_spinup_years - number years apply specified OM , applying specified MP. sablefish, parameter number years since 1960 (0-64), indicates calendar year like begin MSE simulations . recruitment_start_year - year simulation new recruitment events begin . Often n_spinup_years can longer user wants use specific recruitment timeseries beginning MSE simulations. run_estimation - whether estimation method run . FALSE management procedure applied OM outputs directly rather estimates EM. Sensible defaults available via setup_mse_options function. Using begin MSE simulations estimated population state 2024, project forward 100 years. Note total number simulation years single MSE run n_spinup_years + n_proj_years.","code":"options <- setup_mse_options() options ## $n_proj_years ## [1] 100 ## ## $n_spinup_years ## [1] 64 ## ## $recruitment_start_year ## [1] 64 ## ## $run_estimation ## [1] TRUE"},{"path":"/articles/05_running_mse.html","id":"parallel-mse-simulations","dir":"Articles","previous_headings":"","what":"Parallel MSE Simulations","title":"Running the MSE","text":"Frequently, desirable run multiple MSE simulations across different random seeds, evaluate MP face uncertainty. run_mse_parallel(...) function designed act simple parallel wrapper base run_mse(...) function run multiple MSE simulations, OM MP specifications, simulation vary random seed used generate annual recruitment levels simulate observations. use run_mse_parallel users must specify number simulations run, provide list simulation seeds addition OM, MP, options objects required base run_mse function. run_mse_parallel handle parallelizing MSE simulations aggregating output data simulations complete. Note function use N-2 available compute cores machine, allow machine remain functional. Parallel processing enabled use pblapply package associated function. Users need handle creating parallel processing cluster; handled internally.","code":"run_mse_parallel( nsims = 10, seeds = sample(1:1000, 10), om=om, hcr=mp, mse_options=options, nyears = 1 )"},{"path":"/articles/05_running_mse.html","id":"multiple-mse-simulations","dir":"Articles","previous_headings":"","what":"Multiple MSE Simulations","title":"Running the MSE","text":"Often, multiple combinations MPs OMs tested together within MSE evaluate MPs across different states nature. wrapper function run_mse_multiple provided facilitate return appropiately formatted MSE outputs. use run_mse_multiple, users define multiple OM, MP, /MSE options objects, place lists, pass respective lists run_mse_multiple: run_mse_multiple run combinations OMs, MPs, MSE Options provided respective lists, number simulations provided seed_list. diagnostics parameter controls whether return observation data estimation method output objects addition standard set MSE output arrays. default, diagnostics=FALSE save memory. save parameter controls whether save output MSE simulation disk. default, save=FALSE avoid saving large MSE output objects, often needs turned running many combinations OMs, MPs, simulation seeds. default location saved outputs “./data/active/”.","code":"run_mse_multiple( # List of OMs to run om_list = list(om1, om2), # List of MPs to run hcr_list = list(mp1, mp2), # List of MSE options to run mse_options_list = list(options) seed_list = sample(1:1000, 10), nyears=1, diagnostics = FALSE, save = FALSE )"},{"path":"/articles/05_running_mse.html","id":"example","dir":"Articles","previous_headings":"","what":"Example","title":"Running the MSE","text":"example, following code run 10 simulations population om1 om2 operating models, managed using mp_f40 mp_f50 management procedures. simulations use set default model options, estimation method diagnostics returned, MSE outputs saved disk:","code":"om_list = afscOM::listN(om1, om2) mp_list = afscOM::listN(mp_f40, mp_f50) mse_options <- setup_mse_options() seed_list <- sample(1:1000, 10) model_runs <- run_mse_multiple( om_list = om_list, hcr_list = mp_list, seed_list = sample(1:1000, 10), mse_options_list = list(mse_options), nyears=100, diagnostics = FALSE, save = TRUE )"},{"path":"/articles/06_multiple_mse_simulations.html","id":"parallel-processing","dir":"Articles","previous_headings":"","what":"Parallel Processing","title":"Multiple MSE Simulations","text":"Parallel processing within package currently handled via pblapply function pbapply package. function acts like standard lapply function call, allows users provide cluster object parameter faciliatte running given function multiples time, time (.e. parallel). cluster object created via call parallel::makeCluster(...) function. default, SablefishMSE package create cluster using 2 fewer available number cores machine. ensures computational power reserved users complete tasks. fewer number simulations requested (e.g. user asks 5 simulations, computer 10 cores), many compute cores simulations used. full workflow used run_mse_parallel function follows: Users need setup clusters; code block provided demonstrate exactly going within run_mse_parallel function.","code":"cores <- min(parallel::detectCores()-2, nsims) cl <- parallel::makeCluster(cores, outfile=\"\") registerDoParallel(cl) pbapply::pblapply(..., function(...){ # Additional code to handle function imports, the run_mse() call, and data collation })"},{"path":"/articles/06_multiple_mse_simulations.html","id":"using-run_mse_parallel","dir":"Articles","previous_headings":"","what":"Using run_mse_parallel","title":"Multiple MSE Simulations","text":"run_mse_parallel(...) function designed act simple parallel wrapper base run_mse(...) function. create parallel computing cluster, run multiple MSE simulations, OM HCR specifications, simulation vary random seed used generate annual recruitment levels simulate observations. use wrapper, users can simple define om hcr object using basic run_mse() function, additionally specify total number simulations, nsims vector random simulation seeds parallelized across. full workflow works like: future, additional parallel wrapper functions allow running multiple MSE simulations across multiple different HCRs multiple different OMs also available.","code":"om <- ... # Create an OM object hcr <- ... # Create an HCR function nsims <- 10 # run 10 simulations seeds <- sample(1:1e6, nsims) # get some random seeds run_mse_parallel(nsims, seeds, om, hcr, nyears=nyears)"},{"path":"/articles/06_processing_mse_results.html","id":"mse-output-data","dir":"Articles","previous_headings":"","what":"MSE Output Data","title":"Processing MSE Output Data","text":"three MSE functions (run_mse, run_mse_parallel, run_mse_multiple) output types data similar format. run_mse - data output named list multidimensional arrays maximum dimension [n_proj_years+n_spinup_years, nages, nsexes, nregions, nfleets]. run_mse_parallel - data output named list multidimensional arrays run_mse added dimension referring simulation run_mse_multiple - data output list completed MSE simulations run_mse_parallel, list element referring one combination OM, MP, MSE option.","code":""},{"path":"/articles/06_processing_mse_results.html","id":"description-of-output-data","dir":"Articles","previous_headings":"MSE Output Data","what":"Description of Output Data","title":"Processing MSE Output Data","text":"following data output every call run_mse consequently available calls run_mse_parallel run_mse_multiple: land_caa - landed catch--age OM ([nyears, nages, nsexes, nregions, nfleets]). Note units weight rather numbers. disc_caa - discarded catch--age OM ([nyears, nages, nsexes, nregions, nfleets]). Note units weight rather numbers. caa - total catch--age (landed + discarded) OM ([nyears, nages, nsexes, nregions, nfleets]). Note units weight rather numbers. faa - fishing mortality --age OM ([nyears, nages, nsexes, nregions, nfleets]) faa_est - fishing mortality --age estimated EM ([nyears, nages, nsexes, nregions, nfleets]) naa - numbers--age OM ([nyears, nages, nsexes, nregions]) naa_est - numbers--age estimated EM ([nyears, nages, nsexes, nregions]) hcr_f - fishing mortality recommended HCR ([n_proj_years, 1]) abc - Acceptable Biological Catch resulting applying HCR ([n_proj_years, 1]) tac - Total Allowable Catch resulting applying HCR subsequent stability constraint harvest caps ([n_proj_years, 1]) exp_land - expected landings accounting partial attainment TAC ([n_proj_years, 1]) global_rec_devs - recruitment deviates OM ([nyears, 1]) Additionally, diagnostics=TRUE run_mse_parallel run_mse_multiple, following outputs also available: survey_obs - observation data generated OM model_outs - completed TMB model objects functions discussed developed intent used survey_obs model_outs output data types.","code":""},{"path":"/articles/06_processing_mse_results.html","id":"reading-mse-output-from-a-file","dir":"Articles","previous_headings":"","what":"Reading MSE Output from a File","title":"Processing MSE Output Data","text":"run_mse_multiple used, users can optionally specify save=TRUE save MSE outputs file. outputs can read back R using provided get_saved_model_runs function. Specifying name OMS MPs read back file vector filter files read back match specified OMS MPs. filters provided, saved model runs read back : function returns list two objects: model_runs, list MSE output data model run, extra_columns, data.frame containing OM MP names corresponding model run. Depending number model runs read back , function often takes several minutes complete. large numbers models, possible read model runs back R . scenarios, existing MSE processing functions (see ) can used process data file--file, combine summarize across files end.","code":"om_filter <- c(\"OM1\", \"OM2\") hcr_filter <- c(\"MP1\", \"MP2\") model_runs <- get_saved_model_runs(om_filter=om_filter, hcr_filter=hcr_filter)"},{"path":"/articles/06_processing_mse_results.html","id":"existing-mse-processing-functions","dir":"Articles","previous_headings":"","what":"Existing MSE Processing Functions","title":"Processing MSE Output Data","text":"Several processing functions available SablefishMSE package allowing easy computation common fisheries quantities. get_ssb_biomass - calculates spawning biomass (SSB) total biomass every year across model runs simulations. get_fishing_mortalities - calculates fleet-specific total fishing mortality every year across model runs simulations. Total fishing mortality assumed maximum age-specific fishing mortality aggregated across fleets. get_recruits - calculates recruitment every year across model runs simulations. function handle recruitment deviates. get_landed_catch - calculates fleet-specific total landed catch every year across model runs simulations. get_dynamic_economic_value - calculates annual economic value fixed gear fleet using dynamic price model assumes prices decline total catch volume (see Goethel et al. 2025 details price model). get_average age - calculates average age population every year across model runs simulations. get_abi - calculates population ABI (Griffiths et al. 2023) every year across model runs simulations. get_management_quantities - aggregates ABC, TAC, expected landings data every year across model runs simulations. Historical ABC, TAC, realized landings hard coded function. functions generally accept parameters, return long format tibble. first two parameters, model_runs extra_columns, outputs get_saved_model_runs required functions. model_runs=NULL, function attempt iteratively read apply underlying process function , saved model run file appropriate. model_runs=NULL, extra_columns parameter must stll provided data.frame containing OM MP names corresponding model run file; easily accomplished extra_columns = expand.grid(om=om_filter, hcr=hcr_filter). om_filter hcr_filter parameters can used specify OMs MPs read process. Additional parameters may required functions. example:","code":"om_filter <- c(\"OM1\", \"OM2\") hcr_filter <- c(\"MP1\", \"MP2\") mse_runs <- get_saved_model_runs(om_filter=om_filter, hcr_filter=hcr_filter) model_runs <- mse_runs$model_runs extra_columns <- mse_runs$extra_columns # Calculate SSB and total biomass across all model runs and simulations ssb_biomass <- get_ssb_biomass(model_runs=model_runs, extra_columns=extra_columns, om1$dem_params, om_filter=om_filter, hcr_filter=hcr_filter) # Alternatively, if `get_saved_model_runs` is not used rm(model_runs, extra_columns) mse_runs <- NULL # Itertaively read in and process each model run file as appropriate ssb_biomass <- get_ssb_biomass(model_runs=NULL, extra_columns=NULL, om1$dem_params, om_filter=om_filter, hcr_filter=hcr_filter)"},{"path":"/articles/06_processing_mse_results.html","id":"performance-metrics","dir":"Articles","previous_headings":"","what":"Performance Metrics","title":"Processing MSE Output Data","text":"Many functions available calculating common sablefish-specific performance metrics MSE output data. functions calculate performance metric across projection period , across model runs. average_catch - average annual catch total_catch - total catch (sum catch years) prop_years_catch - proportion projection years catch exceeded threshold value average_ssb - average annual spawning biomass prop_low_biomass - proportion projection years SSB \\(<0.35\\text{SSB}_{1960}\\) time_below_bref - average number projection years SSB $<B_{ref} (\\(B_{ref}\\) MP specific biomass reference point). average_age - average age individual population average_abi - average ABI population (Griffiths et al. 2023) average_annual_catch_variation - annual year--year variation catch, calculated average absolute value year--year change catch divided average catch across years average_proportion_catch_large - average annual proportion landed catch >9yo average_proportion_biomass_old - average annual proportion biomass >21yo annual_value - average annual value catch assuming fixed relative price per age class dynamic_annual_value - average annual value catch assuming prices fluctuate landed catch volume Two resiliency metrics can also calculated, calculated crash recruitment OM scenarios, internally rely knowing years recruitment crash occurs. biomass_crash_time - average time required SSB decline \\(<0.175\\text{SSB}_{1960}\\). metric calculated first 30 years projection period. biomass_recovery_time - average time required SSB recover \\(>0.35\\text{SSB}_{1960}\\). metric calculated starting year 31 projection period. additional information functions, see function documentation.","code":""},{"path":"/articles/06_processing_mse_results.html","id":"performance_metric_summary-function","dir":"Articles","previous_headings":"Performance Metrics","what":"performance_metric_summary Function","title":"Processing MSE Output Data","text":"summary function available compute multiple performance metrics concatenate single summary tibble object: performance_metric_summary. metric_list parameter controls performance metrics calculate return output tibble. Refer function documentation list valid values provide metric_list.","code":"performance_metric_summary( model_runs=model_runs, extra_columns=extra_columns, dem_params=om$dem_params, ref_naa=ref_naa, hcr_filter=c(\"MP1\", \"MP2\"), om_filter=c(\"OM1\", \"OM2\"), interval_widths=c(0.50, 0.95), # List of metrics to calculate metric_list = c(\"avg_catch\", \"avg_variation\", \"avg_ssb\", \"avg_age\", \"prop_years_lowssb\") )"},{"path":"/articles/SablefishMSE.html","id":"a-simple-example","dir":"Articles","previous_headings":"","what":"A Simple Example","title":"SablefishMSE","text":"simple runnable example MSE simulation loop available dev/sablefish_mse.r. script includes loading afscOM compatible operating model, loading existing recruitment function, loading existing managment procedure object, running MSE simulation loop. primary R function runs MSE simulation loop : , break components go om, mp, options parameters.","code":"run_mse_multiple( om, mp, options, seed=seed )"},{"path":"/articles/SablefishMSE.html","id":"setting-up-the-operating-model","dir":"Articles","previous_headings":"A Simple Example","what":"Setting up the Operating Model","title":"SablefishMSE","text":"First, start defining operating model. package relies afscOM package run forward OM projection component MSE, well generate observation data. afscOM requires users define three objects control behavior forward projection: dem_params list, model_options list, init_naa array. dem_params list named list multi-dimensional arrays define demographic parameters vary across time, age, sex, space, fleet, within OM. demographic arrays dimension: [nyears, nages, nsexes, nregions, nfleets] (arrays, weight--age, nfleets dimension, others, selectivity, ). model_options list complex named list various options control, among things, details observation processes catches apportioned fleets spatial regions. init_naa array [1, nages, nsexes, nregions] array specifying numbers--age sex spatial region start firts year OM. details proper construction objects, please refer afscOM documentation. addition components required afscOM, users must also define recruitment object defines future recruitment occur within MSE loop. object simply added end OM object alongside required components discussed . information defining recruitment objects, see “Specifying Recruitment”.","code":"sable_om <- readRDS(\"data/sablefish_om_big.RDS\") # Read this saved OM from a file sable_om$dem_params # List of demographic parameter arrays sable_om$model_options # List of OM options (e.g. observation process parameters) sable_om$init_naa # Array of numbers-at-age in years 1 of the OM # Define recruitment to occur via historical resampling recruitment_obj <- list( # R function for generating future recruitments func=resample_recruits, # List of parameters values to pass to `func` pars <- list( hist_recruits = hist_recruits, nyears = 10*nyears ) ) sable_om$recruitment <- recruitment_obj"},{"path":"/articles/SablefishMSE.html","id":"setting-up-a-management-procedure-object","dir":"Articles","previous_headings":"A Simple Example","what":"Setting up a Management Procedure Object","title":"SablefishMSE","text":"Second, users must defined management procedure (MP) objects defines harvest control rule (HCR) apply annually, well otehr aspects management regime, survey frequency, assessment frequency, reference point calculation methods. default MP object can created: though default mp object define HCR function. define HCR object, create new list object following structure: HCR object defines NPFMC Tier 3 HCR groundfish Alaska, without extra parameters, stability constraints, harvest caps. output tier3 function fishing mortality (“F”) units. information defining management procedure harvest control rule objects, see “Defining Management Procedures”.","code":"mp <- setup_mp_options() mp #> $hcr #> $hcr$func #> NULL #> #> $hcr$extra_pars #> [1] NA #> #> $hcr$extra_options #> $hcr$extra_options$max_stability #> [1] NA #> #> $hcr$extra_options$harvest_cap #> [1] NA #> #> #> $hcr$units #> NULL #> #> #> $ref_points #> $ref_points$spr_target #> [1] 0.4 #> #> $ref_points$rp_start_age #> [1] 1 #> #> $ref_points$rp_hyperallometry #> [1] 1 #> #> #> $management #> $management$abc_tac_reduction #> [1] 1 #> #> $management$tac_land_reduction #> [1] 1 #> #> #> $survey_frequency #> [1] 1 #> #> $assessment_frequency #> [1] 1 hcr_obj <- list( # R function defining HCR func = tier3, # List of extra parameters required by `func` extra_pars = NA, # Specify stability constraints and/or harvest caps extra_options = list( max_stability = NA, harvest_cap = NA ), # Output units of `func` units = \"F\" ) hcr_obj #> $func #> <srcref: file \"\" chars 1:10 to 8:1> #> #> $extra_pars #> [1] NA #> #> $extra_options #> $extra_options$max_stability #> [1] NA #> #> $extra_options$harvest_cap #> [1] NA #> #> #> $units #> [1] \"F\" mp$hcr <- hcr_obj"},{"path":"/articles/SablefishMSE.html","id":"defining-mse-options","dir":"Articles","previous_headings":"A Simple Example","what":"Defining MSE Options","title":"SablefishMSE","text":"list options define internal aspects MSE simulation loop (number projection years, whether run estimation method, etc.) also required. default MSE option list available via:","code":"mse_options <- setup_mse_options() mse_options #> $n_proj_years #> [1] 100 #> #> $n_spinup_years #> [1] 64 #> #> $recruitment_start_year #> [1] 64 #> #> $run_estimation #> [1] TRUE"},{"path":"/articles/SablefishMSE.html","id":"running-the-mse","dir":"Articles","previous_headings":"A Simple Example","what":"Running the MSE","title":"SablefishMSE","text":"OM object, MP object, MSE options list correctly defined, running MSE simple : seed parameters specified random seed use throughout simulation loop. wrapper functions performing many MSE runs across different random seeds parallel, performing MSE runs across combination OM MP objects. information multiple parallel MSE simulations, see “Running MSE Simulations”.","code":"mse <- run_mse( om = sable_om, mp = mp, options = mse_options, seed=seed )"},{"path":"/articles/SablefishMSE.html","id":"processing-mse-outputs","dir":"Articles","previous_headings":"A Simple Example","what":"Processing MSE outputs","title":"SablefishMSE","text":"run_mse function returns large amount data back user including numbers--age sex every year (true estimated), fishing-mortality--age (true estimated), landed catch, recommended F HCR year. facilitate easier processing results, especially MSEs different OMs different HCRs compared, bind_mse_outputs function provided. bind_mse_outputs function accepts list completed MSE simulations, grid “extra columns” specifying OM MP MSE simulation corresponds , vector variable names pull completed MSE simulations, outputs long-format dataframe requested data. information using function see “Processing MSE Results” page. Wrapper functions provided faciliate easy computation visualization common quantities spawning biomass, annual fishing mortality, catch. example one way users may plot SSB.","code":"model_runs <- list( mse ) extra_columns <- expand.grid( om = c(\"om1\") hcr = c(\"mp1\") ) naa_out <- bind_mse_outputs(model_runs, var=c(\"naa\"), extra_columns) # Plot spawning biomass from OM and EM ssb_data <- get_ssb_biomass( model_runs=model_runs, extra_columns=extra_columns, dem_params=sable_om$dem_params, ) plot_ssb( ssb_data, # SSB Data to plot v1=\"hcr\", # Variable to associate with color v2=\"om\", # Variable to facet by v3=NA, show_est = FALSE # Dont plot SSB estimates )"},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joshua Zahner. Author. Benjamin Williams. Author, maintainer. Dan Goethel. Author. Curry Cunningham. Author. Chris Lunsford. Contributor. Matt Cheng. Author.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zahner J, Williams B, Goethel D, Cunningham C, Cheng M (2026). SablefishMSE: Conduct Management Strategy Evaluation Alaska Sablefish. R package version 0.1.0.0000.","code":"@Manual{, title = {SablefishMSE: Conduct Management Strategy Evaluation for Alaska Sablefish}, author = {Joshua Zahner and Benjamin Williams and Dan Goethel and Curry Cunningham and Matt Cheng}, year = {2026}, note = {R package version 0.1.0.0000}, }"},{"path":"/index.html","id":"sablefishmse---management-strategy-evaluation-for-alaska-sablefish","dir":"","previous_headings":"","what":"Conduct Management Strategy Evaluation for Alaska Sablefish","title":"Conduct Management Strategy Evaluation for Alaska Sablefish","text":"Joshua . Zahner (UAF), Ben Williams (NOAA), Curry Cunningham (UAF), Dan Goethel (NOAA), Matt Cheng (UAF), Maia Kapur (NOAA), Chris Lunsford (NOAA) management strategy evaluation simulation framework assessing alternative management options Alaska sablefish North Pacific ocean, jurisidiction U.S. North Pacific Fisheries Management Council. MSE operating model (OM) built using afscOM R package, generalized fisheries operating model implementation. OM age-structured (ages 2-31), multi-sex (male female), single region (coastwide Alaska) model, two active fisheries (fixed gear trawl) two scientific surveys (NOAA domestic longline NOAA trawl), built demographic parameters used/estimated 2023 Alaska sablefish stock assessment (Goethel et al. 2023). MSE estimation model (EM) modified version SpatialSablefishAssessment TMB model built 2022, updated include recruitment bias ramp fit sex-disaggregated age composition data. range recruitment models harvest control rules (HCRs) implemented allow testing efficacy many different management strategies across range reasonable future recruitment scenarios. Examples run full MSE simulation loop available dev/sablefish_mse_example.r","code":""},{"path":"/index.html","id":"project-background-and-objectives","dir":"","previous_headings":"","what":"Project background and objectives","title":"Conduct Management Strategy Evaluation for Alaska Sablefish","text":"Alaskan sablefish (Anoplopoma fimbria) currently managed using North Pacific Fishery Management Council’s (NPFMC) F40 harvest control rule (HCR). However, sablefish long-lived, relatively slow growing species generic HCRs aimed maximizing yearly harvest (e.g., spawner-per-recruit, SPR, based maximum sustainable yield proxies) may perform adequately achieving key conservation fishery performance metrics (e.g., maintaining robust age structure maximizing long-term fishery yield). address scientific stakeholder concerns regarding robustness current HCR sablefish, closed loop simulation tool developed implemented test efficacy robustness current alternate HCRs well spawning metrics management strategy evaluation (MSE; Punt et al. 2016). aim study identify HCRs can achieve conservation economic priorities, also exploring assumptions regarding calculation spawning potential impact HCR robustness.","code":""},{"path":"/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Conduct Management Strategy Evaluation for Alaska Sablefish","text":"Goethel, D.R., Cheng, M.L.H., Echave, K.B., Marsh, C., Rodgveller, C.J., Shotwell, K., Siwicke, K., 2023. Stock Assessment sablefish stock Alaska. North Pacific Fisheries Management Council, Anchorage, AK. Punt, .E., Butterworth, D.S., de Moor, C.L., De Oliveira, J..., Haddon, M., 2016. Management strategy evaluation: best practices. Fish Fisheries 17, 303–334. https://doi.org/10.1111/faf.12104","code":""},{"path":"/reference/aav.html","id":null,"dir":"Reference","previous_headings":"","what":"Average Annual Variation (AAV) — aav","title":"Average Annual Variation (AAV) — aav","text":"Calculates average annual variation ($|x_y - x_y-1|mean(x)N-1$)","code":""},{"path":"/reference/aav.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average Annual Variation (AAV) — aav","text":"","code":"aav(data)"},{"path":"/reference/aav.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average Annual Variation (AAV) — aav","text":"data ordered vector observations quantity","code":""},{"path":"/reference/abi.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Age-Based Indicator — abi","title":"Compute Age-Based Indicator — abi","text":"Compute ABI (Griffiths et al. 2023) given population age structure age structure use reference.","code":""},{"path":"/reference/abi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Age-Based Indicator — abi","text":"","code":"abi(naa, ref, threshold = 0.9, start_age = 2)"},{"path":"/reference/abi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Age-Based Indicator — abi","text":"naa numbers--age vector ref reference naa vector threshold proportion population consider \"old\" start_age age start calculating ABI","code":""},{"path":"/reference/as_scalar_threshold_f.html","id":null,"dir":"Reference","previous_headings":"","what":"Threshold HCR with Fmax scaled by Age Structure — as_scalar_threshold_f","title":"Threshold HCR with Fmax scaled by Age Structure — as_scalar_threshold_f","text":"Compute allowable fishing mortality rate threshold HCR parameterized f_min, f_max, lrp, urp, scales f_max age structure summary statistic relative value summmary statistic reference age structure.","code":""},{"path":"/reference/as_scalar_threshold_f.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Threshold HCR with Fmax scaled by Age Structure — as_scalar_threshold_f","text":"","code":"as_scalar_threshold_f(x, naa, ref_naa, as_func, ..., f_min, f_max, lrp, urp)"},{"path":"/reference/as_scalar_threshold_f.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Threshold HCR with Fmax scaled by Age Structure — as_scalar_threshold_f","text":"x input HCR (e.g. SSB , SSB/B40) naa age structure (e.g. numbers age biomass age) ref_naa age structure compare `naa` as_func function compute age structure statistic (must take naa first argument) ... additional arguments pass `as_func(naa, ...)` f_min F use x < lrp f_max F use x > urp lrp value x f_min applies urp value x f_max applies","code":""},{"path":"/reference/average_abi.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average ABI across projection period — average_abi","title":"Compute Average ABI across projection period — average_abi","text":"Compute average ABI (median CIs; Griffiths et al. 2024) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/average_abi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average ABI across projection period — average_abi","text":"","code":"average_abi( model_runs, extra_columns, ref_naa, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/average_abi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average ABI across projection period — average_abi","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) ref_naa reference age structure ABI computation hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/average_age.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute average age of a population — average_age","title":"Compute average age of a population — average_age","text":"Calculate average age population given age structure.","code":""},{"path":"/reference/average_age.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute average age of a population — average_age","text":"","code":"average_age(naa, ages)"},{"path":"/reference/average_age.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute average age of a population — average_age","text":"naa numbers--age vector ages vector ages","code":""},{"path":"/reference/average_annual_catch_variation.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Annual Catch Variation (AAV) across projection period — average_annual_catch_variation","title":"Compute Average Annual Catch Variation (AAV) across projection period — average_annual_catch_variation","text":"Compute average annual catch variation (median CIs) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/average_annual_catch_variation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Annual Catch Variation (AAV) across projection period — average_annual_catch_variation","text":"","code":"average_annual_catch_variation( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/average_annual_catch_variation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Annual Catch Variation (AAV) across projection period — average_annual_catch_variation","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/average_annual_dynamic_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Annual Dynamic Value of Catch across projection period — average_annual_dynamic_value","title":"Compute Average Annual Dynamic Value of Catch across projection period — average_annual_dynamic_value","text":"Compute average annual dynamic value landed catch fixed-gear fleet (median CIs) per year across years simulation seeds, combination operating models management procedures. Value computed based assumed linear relationship catch price (assuming increased catch floods existing markets decreases prices due market abundance), prices constant \"maximum\" level catch <15k mt, constant \"minimum\" level catch >30k mt. Pricing data June 2024 NPFMC Small Sablefish Release Analyses.","code":""},{"path":"/reference/average_annual_dynamic_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Annual Dynamic Value of Catch across projection period — average_annual_dynamic_value","text":"","code":"average_annual_dynamic_value( model_runs, extra_columns, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/average_annual_dynamic_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Annual Dynamic Value of Catch across projection period — average_annual_dynamic_value","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric ","code":""},{"path":"/reference/average_annual_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Annual Value of Catch across projection period — average_annual_value","title":"Compute Average Annual Value of Catch across projection period — average_annual_value","text":"Compute average annual value landed catch (median CIs) per year across years simulation seeds, combination operating models management procedures. Fish >9yo considered \"high value\" assigned relative value 1, fish 5-9yo considered \"medium value\" asisgned relative value 0.556, fish <5yo considered \"low value\" assigned relative valye 0.337.","code":""},{"path":"/reference/average_annual_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Annual Value of Catch across projection period — average_annual_value","text":"","code":"average_annual_value( model_runs, extra_columns, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/average_annual_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Annual Value of Catch across projection period — average_annual_value","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/average_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Catch across projection period — average_catch","title":"Compute Average Catch across projection period — average_catch","text":"Compute average catch (median CIs) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/average_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Catch across projection period — average_catch","text":"","code":"average_catch( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/average_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Catch across projection period — average_catch","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/average_proportion_biomass_old.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute average proportion of population that is ","title":"Compute average proportion of population that is ","text":"Compute aaverage proportion population \"Old\" (median CIs) per year across years simulation seeds, combination operating models management procedures. \"Old\" fish >21yo.","code":""},{"path":"/reference/average_proportion_biomass_old.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute average proportion of population that is ","text":"","code":"average_proportion_biomass_old( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/average_proportion_biomass_old.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute average proportion of population that is ","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/average_proportion_catch_large.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute average proportion of catch that is ","title":"Compute average proportion of catch that is ","text":"Compute average proportion catch \"large\" (median CIs) per year across years simulation seeds, combination operating models management procedures. \"Large\" fish >9yo (approximate age corresponding highest processor grade sablefish Alaska).","code":""},{"path":"/reference/average_proportion_catch_large.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute average proportion of catch that is ","text":"","code":"average_proportion_catch_large( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/average_proportion_catch_large.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute average proportion of catch that is ","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/average_ssb.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average SSB across projection period — average_ssb","title":"Compute Average SSB across projection period — average_ssb","text":"Compute average SSB (median CIs) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/average_ssb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average SSB across projection period — average_ssb","text":"","code":"average_ssb( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/average_ssb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average SSB across projection period — average_ssb","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) dem_params demographic parameters matrices OM hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/beverton_holt.html","id":null,"dir":"Reference","previous_headings":"","what":"Beverton-Holt stock recruitment relationship — beverton_holt","title":"Beverton-Holt stock recruitment relationship — beverton_holt","text":"Defines function factory yieding recruitment Bevrton-Holt stock recruitment relationship, parameterized using steepeness. Initial call function sets new function takes current SSB input, returns predicted recruitment BH SRR defined h, R0, S0.","code":""},{"path":"/reference/beverton_holt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Beverton-Holt stock recruitment relationship — beverton_holt","text":"","code":"beverton_holt(h, R0, S0, sigR, seed)"},{"path":"/reference/beverton_holt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Beverton-Holt stock recruitment relationship — beverton_holt","text":"h steepness (0.2 <= h <= 1.0) R0 unfished recruitment S0 unfished spawning biomass","code":""},{"path":"/reference/beverton_holt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Beverton-Holt stock recruitment relationship — beverton_holt","text":"","code":"if (FALSE) { bevholt <- beverton_holt(0.7, 25, 300) bevholt(ssb=185) # 23.43891 }"},{"path":"/reference/beverton_holt_recruits.html","id":null,"dir":"Reference","previous_headings":"","what":"Beverton-Holt stock recruitment relationship — beverton_holt_recruits","title":"Beverton-Holt stock recruitment relationship — beverton_holt_recruits","text":"Defines function factory yieding recruitment Bevrton-Holt stock recruitment relationship, parameterized using steepeness. Initial call function sets new function takes current SSB input, returns predicted recruitment BH SRR defined h, R0, S0.","code":""},{"path":"/reference/beverton_holt_recruits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Beverton-Holt stock recruitment relationship — beverton_holt_recruits","text":"","code":"beverton_holt_recruits(h, R0, S0, sigR, seed)"},{"path":"/reference/beverton_holt_recruits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Beverton-Holt stock recruitment relationship — beverton_holt_recruits","text":"h steepness (0.2 <= h <= 1.0) R0 unfished recruitment S0 unfished spawning biomass","code":""},{"path":"/reference/beverton_holt_recruits.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Beverton-Holt stock recruitment relationship — beverton_holt_recruits","text":"","code":"if (FALSE) { bevholt <- beverton_holt(0.7, 25, 300) bevholt(ssb=185) # 23.43891 }"},{"path":"/reference/bevholt_regime_recruits.html","id":null,"dir":"Reference","previous_headings":"","what":"Regime Beverton-Holt stock recruitment relationship — bevholt_regime_recruits","title":"Regime Beverton-Holt stock recruitment relationship — bevholt_regime_recruits","text":"Defines two-regime recruitment function regime defined Beverton-Holt stock recruitment relationship differeing levels R0 sigR.","code":""},{"path":"/reference/bevholt_regime_recruits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regime Beverton-Holt stock recruitment relationship — bevholt_regime_recruits","text":"","code":"bevholt_regime_recruits( h, sbpr, R0s, sigRs, nyears, regime_length, starting_regime, seed )"},{"path":"/reference/bevholt_regime_recruits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regime Beverton-Holt stock recruitment relationship — bevholt_regime_recruits","text":"h steepness (0.2 <= h <= 1.0) sbpr spawning biomass per recruit unfished conditions R0s vector unfished recruitments (one regime, max 2) sigRs vector recruitment variability (one regime, max 2) nyears total number years recruitments generate regime_length vector length regime starting_regime regime start (0 = first regime, 1 = second regime) seed random seed reproducability","code":""},{"path":"/reference/bevholt_regimes.html","id":null,"dir":"Reference","previous_headings":"","what":"Regime Beverton-Holt stock recruitment relationship — bevholt_regimes","title":"Regime Beverton-Holt stock recruitment relationship — bevholt_regimes","text":"Defines two-regime recruitment function regime defined Beverton-Holt stock recruitment relationship differeing levels R0 sigR.","code":""},{"path":"/reference/bevholt_regimes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regime Beverton-Holt stock recruitment relationship — bevholt_regimes","text":"","code":"bevholt_regimes( h, sbpr, R0s, sigRs, nyears, regime_length, starting_regime, seed )"},{"path":"/reference/bevholt_regimes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regime Beverton-Holt stock recruitment relationship — bevholt_regimes","text":"h steepness (0.2 <= h <= 1.0) sbpr spawning biomass per recruit unfished conditions R0s vector unfished recruitments (one regime, max 2) sigRs vector recruitment variability (one regime, max 2) nyears total number years recruitments generate regime_length vector length regime starting_regime regime start (0 = first regime, 1 = second regime) seed random seed reproducability","code":""},{"path":"/reference/bind_mse_outputs.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Tibble of MSE Output Data from Multiple Models — bind_mse_outputs","title":"Create Tibble of MSE Output Data from Multiple Models — bind_mse_outputs","text":"Create Tibble MSE Output Data Multiple Models","code":""},{"path":"/reference/bind_mse_outputs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Tibble of MSE Output Data from Multiple Models — bind_mse_outputs","text":"","code":"bind_mse_outputs(model_runs, var, extra_columns)"},{"path":"/reference/bind_mse_outputs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Tibble of MSE Output Data from Multiple Models — bind_mse_outputs","text":"model_runs list MSE model run objects (created via `run_mse(...)`) var output variable model run objects extra_columns data.frame extra column names values add tibble","code":""},{"path":"/reference/biomass_crash_time.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute number of years requied for SSB to crash — biomass_crash_time","title":"Compute number of years requied for SSB to crash — biomass_crash_time","text":"Compute average number years required SSB decline 0.2*SSB0 (median CIs) combination operating models management procedures.","code":""},{"path":"/reference/biomass_crash_time.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute number of years requied for SSB to crash — biomass_crash_time","text":"","code":"biomass_crash_time( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(55, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/biomass_crash_time.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute number of years requied for SSB to crash — biomass_crash_time","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/biomass_crash_time.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute number of years requied for SSB to crash — biomass_crash_time","text":"Scenarios (combinations OM-MP-seed) crash threshold met, removed dataset computing median CIs.","code":""},{"path":"/reference/biomass_recovery_time.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute number of years requied for SSB to recover — biomass_recovery_time","title":"Compute number of years requied for SSB to recover — biomass_recovery_time","text":"Compute average number years required SSB recover 0.4*SSB0 (median CIs) following known SSB crash combination operating models management procedures.","code":""},{"path":"/reference/biomass_recovery_time.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute number of years requied for SSB to recover — biomass_recovery_time","text":"","code":"biomass_recovery_time( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(55, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/biomass_recovery_time.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute number of years requied for SSB to recover — biomass_recovery_time","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/biomass_recovery_time.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute number of years requied for SSB to recover — biomass_recovery_time","text":"\"Recovery\" begins exactly 20 years start simulation correspond \"Immediate Crash Recruitment\" scenario.","code":""},{"path":"/reference/calculate_joint_selret.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Joint Selectivity and Retention Across Multiple Fleets — calculate_joint_selret","title":"Calculate Joint Selectivity and Retention Across Multiple Fleets — calculate_joint_selret","text":"Computes average selectivity--age retention--age acting population multiple fleets present. Selectivity retention weighted based user supplied weights.","code":""},{"path":"/reference/calculate_joint_selret.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Joint Selectivity and Retention Across Multiple Fleets — calculate_joint_selret","text":"","code":"calculate_joint_selret(sel, ret, prop_fs = c(0.5, 0.5))"},{"path":"/reference/calculate_joint_selret.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Joint Selectivity and Retention Across Multiple Fleets — calculate_joint_selret","text":"sel selectiviity--age ([1, nages, nesexes, nregions, nfleets]) ret retention--age ([1, nages, nsexes, nregions, nfleets]) prop_fs fleet weights","code":""},{"path":"/reference/calculate_npfmc_ref_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate NPFMC groundfish reference points — calculate_npfmc_ref_points","title":"Calculate NPFMC groundfish reference points — calculate_npfmc_ref_points","text":"Calculate F_OFL (F_35 (SSB F_ABC).","code":""},{"path":"/reference/calculate_npfmc_ref_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate NPFMC groundfish reference points — calculate_npfmc_ref_points","text":"","code":"calculate_npfmc_ref_points(nages, mort, mat, waa, sel, ret, avg_rec)"},{"path":"/reference/calculate_npfmc_ref_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate NPFMC groundfish reference points — calculate_npfmc_ref_points","text":"nages number ages age structure mort instantaneous natural mortality rate mat maturity--age vector waa weight--age vector sel total selectivity--age vector ret total retention--age vector avg_rec average recruitment","code":""},{"path":"/reference/calculate_npfmc_ref_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate NPFMC groundfish reference points — calculate_npfmc_ref_points","text":"list F40, F35, B40","code":""},{"path":"/reference/calculate_ref_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate SPR Based Reference Points — calculate_ref_points","title":"Calculate SPR Based Reference Points — calculate_ref_points","text":"Generalized function computing F biomass based reference point given SPR level","code":""},{"path":"/reference/calculate_ref_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate SPR Based Reference Points — calculate_ref_points","text":"","code":"calculate_ref_points( nages, mort, mat, waa, sel, ret, avg_rec, spr_target, start_age = 1, hyperallometry = 1 )"},{"path":"/reference/calculate_ref_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate SPR Based Reference Points — calculate_ref_points","text":"nages number ages age structure mort instantaneous natural mortality rate mat maturity--age vector waa weight--age vector sel total selectivity--age vector ret total retention--age vector avg_rec average recruitment spr_target target SPR level. length(spr_target) == 1, target SPR level assumed F B reference points. length(spr_target) == 2, element 1 corresponds spr target F, element 2 corresponds spr target B.","code":""},{"path":"/reference/calculate_ref_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate SPR Based Reference Points — calculate_ref_points","text":"list F reference point biomass reference point","code":""},{"path":"/reference/compute_average_abi.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average ABI across projection period — compute_average_abi","title":"Compute Average ABI across projection period — compute_average_abi","text":"Compute average ABI (median CIs; Griffiths et al. 2024) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/compute_average_abi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average ABI across projection period — compute_average_abi","text":"","code":"compute_average_abi( model_runs, extra_columns, ref_naa, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_abi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average ABI across projection period — compute_average_abi","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) ref_naa reference age structure ABI computation hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_average_age.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Age across projection period — compute_average_age","title":"Compute Average Age across projection period — compute_average_age","text":"Compute average age (median CIs) per year across years simulation seeds, combination operating models management procedures. Average age calculated age individuals weighted biomass maturity.","code":""},{"path":"/reference/compute_average_age.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Age across projection period — compute_average_age","text":"","code":"compute_average_age( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_age.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Age across projection period — compute_average_age","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data dem_params demographic parameters matrices OM","code":""},{"path":"/reference/compute_average_annual_catch_variation.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Annual Catch Variation (AAV) across projection period — compute_average_annual_catch_variation","title":"Compute Average Annual Catch Variation (AAV) across projection period — compute_average_annual_catch_variation","text":"Compute average annual catch variation (median CIs) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/compute_average_annual_catch_variation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Annual Catch Variation (AAV) across projection period — compute_average_annual_catch_variation","text":"","code":"compute_average_annual_catch_variation( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_annual_catch_variation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Annual Catch Variation (AAV) across projection period — compute_average_annual_catch_variation","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_average_annual_dynamic_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Annual Dynamic Value of Catch across projection period — compute_average_annual_dynamic_value","title":"Compute Average Annual Dynamic Value of Catch across projection period — compute_average_annual_dynamic_value","text":"Compute average annual dynamic value landed catch fixed-gear fleet (median CIs) per year across years simulation seeds, combination operating models management procedures. Value computed based assumed linear relationship catch price (assuming increased catch floods existing markets decreases prices due market abundance), prices constant \"maximum\" level catch <15k mt, constant \"minimum\" level catch >30k mt. Pricing data June 2024 NPFMC Small Sablefish Release Analyses.","code":""},{"path":"/reference/compute_average_annual_dynamic_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Annual Dynamic Value of Catch across projection period — compute_average_annual_dynamic_value","text":"","code":"compute_average_annual_dynamic_value( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_annual_dynamic_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Annual Dynamic Value of Catch across projection period — compute_average_annual_dynamic_value","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric ","code":""},{"path":"/reference/compute_average_annual_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Annual Value of Catch across projection period — compute_average_annual_value","title":"Compute Average Annual Value of Catch across projection period — compute_average_annual_value","text":"Compute average annual value landed catch (median CIs) per year across years simulation seeds, combination operating models management procedures. Fish >9yo considered \"high value\" assigned relative value 1, fish 5-9yo considered \"medium value\" asisgned relative value 0.556, fish <5yo considered \"low value\" assigned relative valye 0.337.","code":""},{"path":"/reference/compute_average_annual_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Annual Value of Catch across projection period — compute_average_annual_value","text":"","code":"compute_average_annual_value( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_annual_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Annual Value of Catch across projection period — compute_average_annual_value","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_average_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average Catch across projection period — compute_average_catch","title":"Compute Average Catch across projection period — compute_average_catch","text":"Compute average catch (median CIs) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/compute_average_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average Catch across projection period — compute_average_catch","text":"","code":"compute_average_catch( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average Catch across projection period — compute_average_catch","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_average_proportion_biomass_old.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute average proportion of population that is ","title":"Compute average proportion of population that is ","text":"Compute aaverage proportion population \"Old\" (median CIs) per year across years simulation seeds, combination operating models management procedures. \"Old\" fish >21yo.","code":""},{"path":"/reference/compute_average_proportion_biomass_old.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute average proportion of population that is ","text":"","code":"compute_average_proportion_biomass_old( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_proportion_biomass_old.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute average proportion of population that is ","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_average_proportion_catch_large.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute average proportion of catch that is ","title":"Compute average proportion of catch that is ","text":"Compute average proportion catch \"large\" (median CIs) per year across years simulation seeds, combination operating models management procedures. \"Large\" fish >9yo (approximate age corresponding highest processor grade sablefish Alaska).","code":""},{"path":"/reference/compute_average_proportion_catch_large.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute average proportion of catch that is ","text":"","code":"compute_average_proportion_catch_large( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_proportion_catch_large.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute average proportion of catch that is ","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_average_ssb.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Average SSB across projection period — compute_average_ssb","title":"Compute Average SSB across projection period — compute_average_ssb","text":"Compute average SSB (median CIs) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/compute_average_ssb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Average SSB across projection period — compute_average_ssb","text":"","code":"compute_average_ssb( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_average_ssb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Average SSB across projection period — compute_average_ssb","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) dem_params demographic parameters matrices OM hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_biomass_crash_time.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute number of years requied for SSB to crash — compute_biomass_crash_time","title":"Compute number of years requied for SSB to crash — compute_biomass_crash_time","text":"Compute average number years required SSB decline 0.2*SSB0 (median CIs) combination operating models management procedures.","code":""},{"path":"/reference/compute_biomass_crash_time.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute number of years requied for SSB to crash — compute_biomass_crash_time","text":"","code":"compute_biomass_crash_time( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(55, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_biomass_crash_time.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute number of years requied for SSB to crash — compute_biomass_crash_time","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_biomass_crash_time.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute number of years requied for SSB to crash — compute_biomass_crash_time","text":"Scenarios (combinations OM-MP-seed) crash threshold met, removed dataset computing median CIs.","code":""},{"path":"/reference/compute_biomass_recovery_time.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute number of years requied for SSB to recover — compute_biomass_recovery_time","title":"Compute number of years requied for SSB to recover — compute_biomass_recovery_time","text":"Compute average number years required SSB recover 0.4*SSB0 (median CIs) following known SSB crash combination operating models management procedures.","code":""},{"path":"/reference/compute_biomass_recovery_time.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute number of years requied for SSB to recover — compute_biomass_recovery_time","text":"","code":"compute_biomass_recovery_time( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(55, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_biomass_recovery_time.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute number of years requied for SSB to recover — compute_biomass_recovery_time","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_biomass_recovery_time.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute number of years requied for SSB to recover — compute_biomass_recovery_time","text":"\"Recovery\" begins exactly 20 years start simulation correspond \"Immediate Crash Recruitment\" scenario.","code":""},{"path":"/reference/compute_bx.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute average SSB under a level of F — compute_bx","title":"Compute average SSB under a level of F — compute_bx","text":"Compute average SSB given level fishing mortality.","code":""},{"path":"/reference/compute_bx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute average SSB under a level of F — compute_bx","text":"","code":"compute_bx( nages, mort, mat, waa, sel, ret, F, avg_rec, start_age = 1, hyperallometry = 1 )"},{"path":"/reference/compute_bx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute average SSB under a level of F — compute_bx","text":"nages number ages age structure mort instantaneous natural mortality rate mat maturity--age vector waa weight--age vector sel total selectivity--age vector ret total retention--age vector F instantenous fishing mortality rate avg_rec average recruitment","code":""},{"path":"/reference/compute_performance_metric_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute all Performance Metrics — compute_performance_metric_summary","title":"Compute all Performance Metrics — compute_performance_metric_summary","text":"Wrapper function compute performance metrics (identified ). - average annual catch - total catch - proportion years catch exceeds threshold - average ssb - proportion years SSB threshold - average age population - average ABI population (Griffiths et al. 2023) - average annual catch variation - average proportion catch \"large\" - average proportion population \"old\" - annual relative value - annual dynamic value - number years required population delcine 0.2B0 - number years required population exceed 0.4B0","code":""},{"path":"/reference/compute_performance_metric_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute all Performance Metrics — compute_performance_metric_summary","text":"","code":"compute_performance_metric_summary( model_runs, extra_columns, dem_params, ref_naa, hcr_filter, om_filter, interval_widths, time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE, metric_list = \"all\" )"},{"path":"/reference/compute_performance_metric_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute all Performance Metrics — compute_performance_metric_summary","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) dem_params demographic parameters matrices OM ref_naa reference age structure ABI computation hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data metric_list vector names performance metrics compute - `avg_catch` -> average annual catch - `tot_catch` -> total catch - `prop_years_high_catch` -> proportion years catch exceeds threshold - `avg_ssb` -> average ssb - `prop_years_lowssb` -> proportion years SSB threshold - `avg_age` -> average age population - `avg_abi` -> average ABI population (Griffiths et al. 2023) - `avg_variation` -> average annual catch variation - `avg_catch_lg` -> average proportion catch \"large\" - `avg_pop_old` -> average proportion population \"old\" - `annual_value` -> annual relative value - `dynamic_value` -> annual dynamic value - `crash_time` -> number years required population delcine 0.2B0 - `recovery_time` -> number years required population exceed 0.4B0 - `` -> compute metrics","code":""},{"path":"/reference/compute_performance_metric_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute all Performance Metrics — compute_performance_metric_summary","text":"list dataframes. One element individual metric, one element metrics","code":""},{"path":"/reference/compute_prop_low_biomass.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute proportion of years SSB is below a threshold level across projection period — compute_prop_low_biomass","title":"Compute proportion of years SSB is below a threshold level across projection period — compute_prop_low_biomass","text":"Compute average proportion years SSB 0.4*SSB0 (median CIs) across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/compute_prop_low_biomass.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute proportion of years SSB is below a threshold level across projection period — compute_prop_low_biomass","text":"","code":"compute_prop_low_biomass( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(55, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_prop_low_biomass.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute proportion of years SSB is below a threshold level across projection period — compute_prop_low_biomass","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute time_horizon periof years calculate metric extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_prop_years_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute proportion of years catch exceeds a threshold level across projection period — compute_prop_years_catch","title":"Compute proportion of years catch exceeds a threshold level across projection period — compute_prop_years_catch","text":"Compute average proportion years catch exceeds threshold level (median CIs) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/compute_prop_years_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute proportion of years catch exceeds a threshold level across projection period — compute_prop_years_catch","text":"","code":"compute_prop_years_catch( model_runs, extra_columns, hcr_filter, om_filter, catch_threshold, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_prop_years_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute proportion of years catch exceeds a threshold level across projection period — compute_prop_years_catch","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/compute_sbpr.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Spawning Biomass per Recruit (SBPR) — compute_sbpr","title":"Compute Spawning Biomass per Recruit (SBPR) — compute_sbpr","text":"Compute SBPR given level fishing mortality.","code":""},{"path":"/reference/compute_sbpr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Spawning Biomass per Recruit (SBPR) — compute_sbpr","text":"","code":"compute_sbpr( nages, mort, mat, waa, sel, ret, F, start_age = 1, hyperallometry = 1 )"},{"path":"/reference/compute_sbpr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Spawning Biomass per Recruit (SBPR) — compute_sbpr","text":"nages number ages age structure mort instantaneous natural mortality rate mat maturity--age vector waa weight--age vector sel total selectivity--age vector ret total retention--age vector F instantenous fishing mortality rate","code":""},{"path":"/reference/compute_spr.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Spawning Potential Ratio (SPR) — compute_spr","title":"Compute Spawning Potential Ratio (SPR) — compute_spr","text":"Compute SPR, ratio spawning biomass given leve fishing mortality relative unfished spawning biomass.","code":""},{"path":"/reference/compute_spr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Spawning Potential Ratio (SPR) — compute_spr","text":"","code":"compute_spr( nages, mort, mat, waa, sel, ret, F, start_age = 1, hyperallometry = 1 )"},{"path":"/reference/compute_spr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Spawning Potential Ratio (SPR) — compute_spr","text":"nages number ages age structure mort instantaneous natural mortality rate mat maturity--age vector waa weight--age vector sel total selectivity--age vector ret total retention--age vector F instantenous fishing mortality rate","code":""},{"path":"/reference/compute_topsis.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) Scores — compute_topsis","title":"Compute Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) Scores — compute_topsis","text":"Compute TOPSIS scores across set performance metrics, grouped set data splits. TOPSIS method multi-criteria decision-making (MCDM) method ranks alternatives based distance ideal solution (Hwang Yoon 1981; Liu et al. 2025).","code":""},{"path":"/reference/compute_topsis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) Scores — compute_topsis","text":"","code":"compute_topsis(perf_data, topsis_splits, topsis_weights, topsis_minmax)"},{"path":"/reference/compute_topsis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) Scores — compute_topsis","text":"perf_data long-format tibble performance metrics (e.g., performance_metric_summary) topsis_splits vector column names split data (e.g., c(\"om\", \"region\")). TOPSIS scores compute uniquely combination columns, topsis_weights vector weights performance metric (e.g., c(0.5, 0.3, 0.2)). topsis_minmax vector \"min\" \"max\" performance metric, indicating whether minimize maximize metric.","code":""},{"path":"/reference/compute_topsis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) Scores — compute_topsis","text":"tibble TOPSIS scores, one row combination `topsis_splits` column performance metric.","code":""},{"path":"/reference/compute_total_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Total Catch over projection period — compute_total_catch","title":"Compute Total Catch over projection period — compute_total_catch","text":"Compute total catch (median CIs) years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/compute_total_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Total Catch over projection period — compute_total_catch","text":"","code":"compute_total_catch( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/compute_total_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Total Catch over projection period — compute_total_catch","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/constant_F.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute F from a constant F rule — constant_F","title":"Compute F from a constant F rule — constant_F","text":"Compute F constant F rule","code":""},{"path":"/reference/constant_F.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute F from a constant F rule — constant_F","text":"","code":"constant_F(F)"},{"path":"/reference/constant_F.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute F from a constant F rule — constant_F","text":"F fishing mortality rate use","code":""},{"path":"/reference/constant_F.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute F from a constant F rule — constant_F","text":"fishing mortality rate","code":""},{"path":"/reference/crash_recruits.html","id":null,"dir":"Reference","previous_headings":"","what":"Recruitment function with a specified crash period — crash_recruits","title":"Recruitment function with a specified crash period — crash_recruits","text":"Generate future recruitment timeseries via historical reasampling, (see `resample_recruits`) set specific time period projected recruitment different values. Can used specify \"crash\" recruitment, \"spike\" recruitment depending `crash_value`.","code":""},{"path":"/reference/crash_recruits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Recruitment function with a specified crash period — crash_recruits","text":"","code":"crash_recruits( crash_start_year, crash_length, crash_value, hist_recruits, nyears, seed )"},{"path":"/reference/crash_recruits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Recruitment function with a specified crash period — crash_recruits","text":"crash_length number years \"crashed\" recruitment crash_value recruitment \"crash\" period hist_recruits historical timeseries recruitment (deviates) nyears total number years resample seed random seed reproducability crash_start_years projection year start recruitment crash","code":""},{"path":"/reference/custom_theme.html","id":null,"dir":"Reference","previous_headings":"","what":"Custom GGPlot2 theme — custom_theme","title":"Custom GGPlot2 theme — custom_theme","text":"Custom GGPlot2 theme","code":""},{"path":"/reference/custom_theme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Custom GGPlot2 theme — custom_theme","text":"","code":"custom_theme"},{"path":"/reference/custom_theme.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Custom GGPlot2 theme — custom_theme","text":"object class theme (inherits ggplot2::theme, gg, S7_object) length 144.","code":""},{"path":"/reference/extend_3darray_last_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"Extend a 3D array along its final dimension — extend_3darray_last_dim","title":"Extend a 3D array along its final dimension — extend_3darray_last_dim","text":"Copies append values final dimension 3D array end final dimension. Originally written Craig Marsh.","code":""},{"path":"/reference/extend_3darray_last_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extend a 3D array along its final dimension — extend_3darray_last_dim","text":"","code":"extend_3darray_last_dim(array_3d, n)"},{"path":"/reference/extend_3darray_last_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extend a 3D array along its final dimension — extend_3darray_last_dim","text":"array_3d array 3 dimensions n number times concatenate last element 3rd dimension","code":""},{"path":"/reference/extend_vec_last_val.html","id":null,"dir":"Reference","previous_headings":"","what":"Extend a vector by copying its final value — extend_vec_last_val","title":"Extend a vector by copying its final value — extend_vec_last_val","text":"Copies appends final value vector end said vector 'n' times.","code":""},{"path":"/reference/extend_vec_last_val.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extend a vector by copying its final value — extend_vec_last_val","text":"","code":"extend_vec_last_val(vector, n)"},{"path":"/reference/extend_vec_last_val.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extend a vector by copying its final value — extend_vec_last_val","text":"vector vector add n elements n number times concatenate final element","code":""},{"path":"/reference/filter_hcr_om.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter processed MSE data to a subset of HCRs and OMs — filter_hcr_om","title":"Filter processed MSE data to a subset of HCRs and OMs — filter_hcr_om","text":"Filter dataframe processed MSE data include subset HCRs OMs.","code":""},{"path":"/reference/filter_hcr_om.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter processed MSE data to a subset of HCRs and OMs — filter_hcr_om","text":"","code":"filter_hcr_om(data, hcrs, oms)"},{"path":"/reference/filter_hcr_om.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter processed MSE data to a subset of HCRs and OMs — filter_hcr_om","text":"data dataframe processed MSE data hcrs vector HCR names retain data oms vector OM names retain data","code":""},{"path":"/reference/filter_times.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter processed MSE data to between two time points, — filter_times","title":"Filter processed MSE data to between two time points, — filter_times","text":"Filter dataframe processed MSE data 'time' column times set `time_horizon`.","code":""},{"path":"/reference/filter_times.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter processed MSE data to between two time points, — filter_times","text":"","code":"filter_times(data, time_horizon)"},{"path":"/reference/filter_times.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter processed MSE data to between two time points, — filter_times","text":"data dataframe processed MSE data time_horizon vector times filter . first element NA, lower bound 1. second element NA, upper bound maximum value `time` column `data`.","code":""},{"path":"/reference/fit_TMB_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit the SpatialSablefishAssessment TMB Model\n#'\nUse Template Model Builder (TMB) to fit the assessmnte model\nfrom `SpatialSablefishAssessment`. Note that the 'ln_M_year_devs'\nand 'ln_M_age_devs' parameters have been turned off. — fit_TMB_model","title":"Fit the SpatialSablefishAssessment TMB Model\n#'\nUse Template Model Builder (TMB) to fit the assessmnte model\nfrom `SpatialSablefishAssessment`. Note that the 'ln_M_year_devs'\nand 'ln_M_age_devs' parameters have been turned off. — fit_TMB_model","text":"Fit SpatialSablefishAssessment TMB Model #' Use Template Model Builder (TMB) fit assessmnte model `SpatialSablefishAssessment`. Note 'ln_M_year_devs' 'ln_M_age_devs' parameters turned .","code":""},{"path":"/reference/fit_TMB_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit the SpatialSablefishAssessment TMB Model\n#'\nUse Template Model Builder (TMB) to fit the assessmnte model\nfrom `SpatialSablefishAssessment`. Note that the 'ln_M_year_devs'\nand 'ln_M_age_devs' parameters have been turned off. — fit_TMB_model","text":"","code":"fit_TMB_model( data, parameters, model_name = \"CurrentAssessment\", do_newton_steps = FALSE, fix_pars = NA, recompile_model = FALSE )"},{"path":"/reference/fit_TMB_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit the SpatialSablefishAssessment TMB Model\n#'\nUse Template Model Builder (TMB) to fit the assessmnte model\nfrom `SpatialSablefishAssessment`. Note that the 'ln_M_year_devs'\nand 'ln_M_age_devs' parameters have been turned off. — fit_TMB_model","text":"data data list provided TMB (`format_em_data(...)`) parameters parameter list provided TMB (`format_em_data(...)`)","code":""},{"path":"/reference/format_em_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Format OM Observation Data for TMB Assessment Model — format_em_data","title":"Format OM Observation Data for TMB Assessment Model — format_em_data","text":"Format data observations `afscOM` operating model update model data parameters required `SpatialSablefishAssessment` TMB assessment model.","code":""},{"path":"/reference/format_em_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format OM Observation Data for TMB Assessment Model — format_em_data","text":"","code":"format_em_data( nyears, dem_params, land_caa, survey_indices, fxfish_caa_obs, ll_ac_obs, model_options, added_years = 1, file_suffix = \"\" )"},{"path":"/reference/format_em_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format OM Observation Data for TMB Assessment Model — format_em_data","text":"nyears number years data passed model dem_params demographic parameter matrices subsetted 1 year land_caa one year worth landed catch--age data (dimensins [1, nages, nsexes, nregions, nfleets]) survey_indices one year worth survey indices (LL RPN, LL RPW, TW RPW) fxfish_caa_obs one year worth catch--age observation fixed gear fishery ll_ac_obs one year worth age composition observations frmo longline survey model_options list model options provided OM added_year number new years data added (usually 1)","code":""},{"path":"/reference/format_em_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format OM Observation Data for TMB Assessment Model — format_em_data","text":"function requires existence 'data/sablefish_em_data_2022.RDS', 'data/sablefish_em_par_2022.RDS' files, come packaged `SablefishMSE` codebase.","code":""},{"path":"/reference/generate_annual_frequency.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate frequency vector — generate_annual_frequency","title":"Generate frequency vector — generate_annual_frequency","text":"Create vector 0s 1s alternate given frequency. intended used indicate certain actions occur within loop.","code":""},{"path":"/reference/generate_annual_frequency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate frequency vector — generate_annual_frequency","text":"","code":"generate_annual_frequency(frequency, len)"},{"path":"/reference/generate_annual_frequency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate frequency vector — generate_annual_frequency","text":"frequency freqency 1 occurs len length output vector","code":""},{"path":"/reference/get_abi.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Average ABI Timeseries — get_abi","title":"Get Average ABI Timeseries — get_abi","text":"Process MSE simulations average population ABI (Griffiths et al. 2023).","code":""},{"path":"/reference/get_abi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Average ABI Timeseries — get_abi","text":"","code":"get_abi(model_runs, extra_columns, ref_naa, hcr_filter, om_filter)"},{"path":"/reference/get_abi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Average ABI Timeseries — get_abi","text":"model_runs list completed MSE simulation objects extra_columns additional columns append output hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_atage_groups.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Catch or Numbers-at-Age by Age Groups — get_atage_groups","title":"Get Catch or Numbers-at-Age by Age Groups — get_atage_groups","text":"Process MSE simulation results --age specified age groups.","code":""},{"path":"/reference/get_atage_groups.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Catch or Numbers-at-Age by Age Groups — get_atage_groups","text":"","code":"get_atage_groups( model_runs, extra_columns, hcr_filter, om_filter, q, age_groups, group_names, group_abbs, spinup_years = 64, summarise = FALSE, make_segments = FALSE )"},{"path":"/reference/get_atage_groups.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Catch or Numbers-at-Age by Age Groups — get_atage_groups","text":"model_runs list completed MSE simulation objects extra_columns additional columns append output q either \"caa\" (catch--age) \"naa\" (numbers--age) age_groups ages define age groups (3 groups required) group_names names age group group_abbs abbreviated names age group summarise whether summarise across simualtions make_segments whether generate data.frame segment use plotting","code":""},{"path":"/reference/get_average_age.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Average Population Age Timeseries — get_average_age","title":"Get Average Population Age Timeseries — get_average_age","text":"Process MSE simulations average age individual fish population. distinct performance metric name include male female fish calculation average age.","code":""},{"path":"/reference/get_average_age.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Average Population Age Timeseries — get_average_age","text":"","code":"get_average_age(model_runs, extra_columns, hcr_filter, om_filter)"},{"path":"/reference/get_average_age.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Average Population Age Timeseries — get_average_age","text":"model_runs list completed MSE simulation objects extra_columns additional columns append output hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_b40_timeseries.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Timeseries of B40 from MSE Simulations — get_b40_timeseries","title":"Get Timeseries of B40 from MSE Simulations — get_b40_timeseries","text":"Derive timeseries B40 completed MSE simulations.","code":""},{"path":"/reference/get_b40_timeseries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Timeseries of B40 from MSE Simulations — get_b40_timeseries","text":"","code":"get_b40_timeseries(model_runs, extra_columns, hcr_filter, om_filter)"},{"path":"/reference/get_b40_timeseries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Timeseries of B40 from MSE Simulations — get_b40_timeseries","text":"model_runs list completed MSE simulations extra_columns additional columns appended resultant data frame hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_big_recruitment_filter.html","id":null,"dir":"Reference","previous_headings":"","what":"Create dplyr Filter for Years Around Large Recruitment Events — get_big_recruitment_filter","title":"Create dplyr Filter for Years Around Large Recruitment Events — get_big_recruitment_filter","text":"Given list MSE model runs, identifies years recruitment larger specified threshold value OM simulation. information used generate complex boolean expression object use dplyr::filter(...) computing performance metrics.","code":""},{"path":"/reference/get_big_recruitment_filter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create dplyr Filter for Years Around Large Recruitment Events — get_big_recruitment_filter","text":"","code":"get_big_recruitment_filter( om_list, seed_list, model_runs, om_names, large_event_thresh, lags )"},{"path":"/reference/get_big_recruitment_filter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create dplyr Filter for Years Around Large Recruitment Events — get_big_recruitment_filter","text":"om_list list OM objects (given `run_mse_multiple`) seed_list vector list simulation seeds (given `run_mse_multiple`) model_runs list completed MSE model runs (output `run_mse_multiple`) large_event_thresh threshold value declaring recruitment event \"large\"","code":""},{"path":"/reference/get_dynamic_economic_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Timeseries of Dynamic Economic Value — get_dynamic_economic_value","title":"Get Timeseries of Dynamic Economic Value — get_dynamic_economic_value","text":"Process MSE simulations dynamic economic value (Goethel et al. 2025). Economic value calculated linear adjustment price size grade max price achieved low total landings min price achieved high total landings. Value calculated Fixed gear fleet.","code":""},{"path":"/reference/get_dynamic_economic_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Timeseries of Dynamic Economic Value — get_dynamic_economic_value","text":"","code":"get_dynamic_economic_value(model_runs, extra_columns, hcr_filter, om_filter)"},{"path":"/reference/get_dynamic_economic_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Timeseries of Dynamic Economic Value — get_dynamic_economic_value","text":"model_runs list completed MSE simulation objects extra_columns additional columns append output hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_fishing_mortalities.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Annual Fishing Mortality — get_fishing_mortalities","title":"Get Annual Fishing Mortality — get_fishing_mortalities","text":"Process MSE simulations fishing mortality fleet. Total fishing mortality across fleets alsoc computed.","code":""},{"path":"/reference/get_fishing_mortalities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Annual Fishing Mortality — get_fishing_mortalities","text":"","code":"get_fishing_mortalities(model_runs, extra_columns, hcr_filter, om_filter)"},{"path":"/reference/get_fishing_mortalities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Annual Fishing Mortality — get_fishing_mortalities","text":"model_runs list completed MSE simualtion objects extra_columns additional columns append output hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_hcrphase_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get HCR recommended F and SSB data for Phaseplane Plot — get_hcrphase_data","title":"Get HCR recommended F and SSB data for Phaseplane Plot — get_hcrphase_data","text":"Process MSE simulation data recommended F (HCR) SSB year across simulations, OMs, management procedures.","code":""},{"path":"/reference/get_hcrphase_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get HCR recommended F and SSB data for Phaseplane Plot — get_hcrphase_data","text":"","code":"get_hcrphase_data(model_runs, extra_columns, dem_params, hcr_filter, om_filter)"},{"path":"/reference/get_hcrphase_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get HCR recommended F and SSB data for Phaseplane Plot — get_hcrphase_data","text":"model_runs list completed MSE simulations extra_columns additional columns appended resultant data frame dem_params list demographic parameters values hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_landed_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Landed Catches — get_landed_catch","title":"Get Landed Catches — get_landed_catch","text":"Process MSE simulations landed catches fleet. Total landed catch across fleets alsoc computed.","code":""},{"path":"/reference/get_landed_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Landed Catches — get_landed_catch","text":"","code":"get_landed_catch(model_runs, extra_columns, hcr_filter, om_filter)"},{"path":"/reference/get_landed_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Landed Catches — get_landed_catch","text":"model_runs list completed MSE simualtion objects extra_columns additional columns append output hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_management_quantities.html","id":null,"dir":"Reference","previous_headings":"","what":"Get ABC, TAC, and Expected Landings — get_management_quantities","title":"Get ABC, TAC, and Expected Landings — get_management_quantities","text":"Process MSE simulations ABC, TAC, expected landings quantities. Historical ABCs, TACs, landings appendded begining output data.frame, Goethel et al. 2023.","code":""},{"path":"/reference/get_management_quantities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get ABC, TAC, and Expected Landings — get_management_quantities","text":"","code":"get_management_quantities( model_runs, extra_columns, hcr_filter, om_filter, spinup_years = 64 )"},{"path":"/reference/get_management_quantities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get ABC, TAC, and Expected Landings — get_management_quantities","text":"model_runs list completed MSE simulation objects extra_columns additional columns append output hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`) spinup_years year begin calculating quantities","code":""},{"path":"/reference/get_phaseplane_catch_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Catch and SSB data for Phaseplane Plot — get_phaseplane_catch_data","title":"Get Catch and SSB data for Phaseplane Plot — get_phaseplane_catch_data","text":"Process MSE simulation data landed catch SSB year across simulations, OMs, management procedures.","code":""},{"path":"/reference/get_phaseplane_catch_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Catch and SSB data for Phaseplane Plot — get_phaseplane_catch_data","text":"","code":"get_phaseplane_catch_data( model_runs, extra_columns, dem_params, hcr_filter, om_filter )"},{"path":"/reference/get_phaseplane_catch_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Catch and SSB data for Phaseplane Plot — get_phaseplane_catch_data","text":"model_runs list completed MSE simulations extra_columns additional columns appended resultant data frame dem_params list demographic parameters values hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_phaseplane_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get F and SSB data for Phaseplane Plot — get_phaseplane_data","title":"Get F and SSB data for Phaseplane Plot — get_phaseplane_data","text":"Process MSE simulation data total F SSB year across simulations, OMs, management procedures.","code":""},{"path":"/reference/get_phaseplane_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get F and SSB data for Phaseplane Plot — get_phaseplane_data","text":"","code":"get_phaseplane_data( model_runs, extra_columns, dem_params, hcr_filter, om_filter )"},{"path":"/reference/get_phaseplane_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get F and SSB data for Phaseplane Plot — get_phaseplane_data","text":"model_runs list completed MSE simulations extra_columns additional columns appended resultant data frame dem_params list demographic parameters values hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_recruits.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Annual Recruits — get_recruits","title":"Get Annual Recruits — get_recruits","text":"Process MSE simulations annual recruits.","code":""},{"path":"/reference/get_recruits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Annual Recruits — get_recruits","text":"","code":"get_recruits(model_runs, extra_columns, hcr_filter, om_filter)"},{"path":"/reference/get_recruits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Annual Recruits — get_recruits","text":"model_runs list completed MSE simualtion objects extra_columns additional columns append output hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/get_reference_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Reference Points from MSE Simulations — get_reference_points","title":"Get Reference Points from MSE Simulations — get_reference_points","text":"Derive fishing mortality biomass reference points completed MSE simulations.","code":""},{"path":"/reference/get_reference_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Reference Points from MSE Simulations — get_reference_points","text":"","code":"get_reference_points(model_runs, extra_columns, rp_year, hcr_filter, om_filter)"},{"path":"/reference/get_reference_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Reference Points from MSE Simulations — get_reference_points","text":"model_runs list completed MSE simulations extra_columns additional columns appended resultant data frame hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`) seed_list simulation seeds used `model_runs`","code":""},{"path":"/reference/get_reference_points.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Reference Points from MSE Simulations — get_reference_points","text":"Note function tested multiple MSE simulations present `model_runs` list.","code":""},{"path":"/reference/get_saved_model_runs.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Saved MSE Model Runs from Disk — get_saved_model_runs","title":"Load Saved MSE Model Runs from Disk — get_saved_model_runs","text":"Read saved RDS files present data/active coerce proper model_runs list object. Also setup correctly specified extra_columns object use bind_mse_outputs.","code":""},{"path":"/reference/get_saved_model_runs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Saved MSE Model Runs from Disk — get_saved_model_runs","text":"","code":"get_saved_model_runs(om_filter = NULL, hcr_filter = NULL)"},{"path":"/reference/get_saved_model_runs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load Saved MSE Model Runs from Disk — get_saved_model_runs","text":"om_order vector correct order OMs (used set OM factor level) hcr_order vector correct order HCRs (used set HCR factor level)","code":""},{"path":"/reference/get_saved_model_runs_old.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Saved MSE Model Runs from Disk — get_saved_model_runs_old","title":"Load Saved MSE Model Runs from Disk — get_saved_model_runs_old","text":"Read saved RDS files present data/active coerce proper model_runs list object. Also setup correctly specified extra_columns object use bind_mse_outputs.","code":""},{"path":"/reference/get_saved_model_runs_old.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Saved MSE Model Runs from Disk — get_saved_model_runs_old","text":"","code":"get_saved_model_runs_old(om_order = NULL, hcr_order = NULL)"},{"path":"/reference/get_saved_model_runs_old.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load Saved MSE Model Runs from Disk — get_saved_model_runs_old","text":"om_order vector correct order OMs (used set OM factor level) hcr_order vector correct order HCRs (used set HCR factor level)","code":""},{"path":"/reference/get_ssb_biomass.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Spawning Biomass and Total Biomass — get_ssb_biomass","title":"Get Spawning Biomass and Total Biomass — get_ssb_biomass","text":"Process MSE simulations spawning biomass, total stock biomass.","code":""},{"path":"/reference/get_ssb_biomass.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Spawning Biomass and Total Biomass — get_ssb_biomass","text":"","code":"get_ssb_biomass(model_runs, extra_columns, dem_params, hcr_filter, om_filter)"},{"path":"/reference/get_ssb_biomass.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Spawning Biomass and Total Biomass — get_ssb_biomass","text":"model_runs list completed MSE simualtion objects extra_columns additional columns append output dem_params demographic parameter matrix hcr_filter vector HCR names process (must match names `extra_columns`) om_filter vector OM names process (must match names `extra_columns`)","code":""},{"path":"/reference/inf_max.html","id":null,"dir":"Reference","previous_headings":"","what":"Get maximum value without considering infinite values — inf_max","title":"Get maximum value without considering infinite values — inf_max","text":"Wrapper around max ignores infinite values","code":""},{"path":"/reference/inf_max.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get maximum value without considering infinite values — inf_max","text":"","code":"inf_max(d)"},{"path":"/reference/inf_max.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get maximum value without considering infinite values — inf_max","text":"d vector values find maximum ","code":""},{"path":"/reference/inf_min.html","id":null,"dir":"Reference","previous_headings":"","what":"Get minimum value without considering infinite values — inf_min","title":"Get minimum value without considering infinite values — inf_min","text":"Wrapper around max ignores infinite values","code":""},{"path":"/reference/inf_min.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get minimum value without considering infinite values — inf_min","text":"","code":"inf_min(d)"},{"path":"/reference/inf_min.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get minimum value without considering infinite values — inf_min","text":"d vector values find maximum ","code":""},{"path":[]},{"path":[]},{"path":"/reference/mp_f40.html","id":null,"dir":"Reference","previous_headings":"","what":"An example management procedure that replicates\nthe NPFMC F40 harvest control rule policy that\nis operationally used to manage sablefish in\nAlaska. — mp_f40","title":"An example management procedure that replicates\nthe NPFMC F40 harvest control rule policy that\nis operationally used to manage sablefish in\nAlaska. — mp_f40","text":"example management procedure replicates NPFMC F40 harvest control rule policy operationally used manage sablefish Alaska. example management procedure uses SPR_50","code":""},{"path":"/reference/mp_f40.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An example management procedure that replicates\nthe NPFMC F40 harvest control rule policy that\nis operationally used to manage sablefish in\nAlaska. — mp_f40","text":"","code":"mp_f40 mp_f40"},{"path":"/reference/mp_f40.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"An example management procedure that replicates\nthe NPFMC F40 harvest control rule policy that\nis operationally used to manage sablefish in\nAlaska. — mp_f40","text":"management procedure object. management procedure object.","code":""},{"path":"/reference/npfmc_tier3_F.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute F from Tier 3 HCR — npfmc_tier3_F","title":"Compute F from Tier 3 HCR — npfmc_tier3_F","text":"Compute F Tier 3 HCR","code":""},{"path":"/reference/npfmc_tier3_F.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute F from Tier 3 HCR — npfmc_tier3_F","text":"","code":"npfmc_tier3_F(ssb, B_ref, F_ref)"},{"path":"/reference/npfmc_tier3_F.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute F from Tier 3 HCR — npfmc_tier3_F","text":"ssb Value SSB B_ref Value biomass based reference point (e.g., B40) F_ref Value fishing mortality based reference point (e.g., F40)","code":""},{"path":"/reference/npfmc_tier3_F.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute F from Tier 3 HCR — npfmc_tier3_F","text":"fishing mortality rate","code":""},{"path":"/reference/om_bh_recruit.html","id":null,"dir":"Reference","previous_headings":"","what":"Beverton-Holt Recruitment OM Object — om_bh_recruit","title":"Beverton-Holt Recruitment OM Object — om_bh_recruit","text":"operating model object generate future recruitment application Beverton-Holt stock recruit function.","code":""},{"path":"/reference/om_bh_recruit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Beverton-Holt Recruitment OM Object — om_bh_recruit","text":"","code":"om_bh_recruit"},{"path":"/reference/om_bh_recruit.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Beverton-Holt Recruitment OM Object — om_bh_recruit","text":"operating model object","code":""},{"path":"/reference/om_bhcyclic_recruit.html","id":null,"dir":"Reference","previous_headings":"","what":"Cylic Recruitment OM Object — om_bhcyclic_recruit","title":"Cylic Recruitment OM Object — om_bhcyclic_recruit","text":"operating model object generate future recruitment via cyclic pattern Beverton-Holt SRRs. first cycle low recruitment phase lasting 20 years, second cycle high recruitment phase lasting 5 years.","code":""},{"path":"/reference/om_bhcyclic_recruit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cylic Recruitment OM Object — om_bhcyclic_recruit","text":"","code":"om_bhcyclic_recruit"},{"path":"/reference/om_bhcyclic_recruit.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cylic Recruitment OM Object — om_bhcyclic_recruit","text":"operating model object","code":""},{"path":"/reference/om_crash_recruit.html","id":null,"dir":"Reference","previous_headings":"","what":"Crash Recruitment OM Object — om_crash_recruit","title":"Crash Recruitment OM Object — om_crash_recruit","text":"operating model object generate future recruitment via recruitment crash first 20 years, resort resampling historical recruitment timeseries.","code":""},{"path":"/reference/om_crash_recruit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crash Recruitment OM Object — om_crash_recruit","text":"","code":"om_crash_recruit"},{"path":"/reference/om_crash_recruit.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crash Recruitment OM Object — om_crash_recruit","text":"operating model object","code":""},{"path":"/reference/om_rand_recruit.html","id":null,"dir":"Reference","previous_headings":"","what":"Random Recruitment OM Object — om_rand_recruit","title":"Random Recruitment OM Object — om_rand_recruit","text":"operating model object generate future recruitment randomly resampling historical recruitment timeseries","code":""},{"path":"/reference/om_rand_recruit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random Recruitment OM Object — om_rand_recruit","text":"","code":"om_rand_recruit"},{"path":"/reference/om_rand_recruit.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random Recruitment OM Object — om_rand_recruit","text":"operating model object","code":""},{"path":"/reference/performance_metric_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute all Performance Metrics — performance_metric_summary","title":"Compute all Performance Metrics — performance_metric_summary","text":"Wrapper function compute performance metrics (identified ). - average annual catch - total catch - proportion years catch exceeds threshold - average ssb - proportion years SSB threshold - average age population - average ABI population (Griffiths et al. 2023) - average annual catch variation - average proportion catch \"large\" - average proportion population \"old\" - annual relative value - annual dynamic value - number years required population delcine 0.2B0 - number years required population exceed 0.4B0","code":""},{"path":"/reference/performance_metric_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute all Performance Metrics — performance_metric_summary","text":"","code":"performance_metric_summary( model_runs, extra_columns, dem_params, ref_naa, hcr_filter, om_filter, interval_widths, time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE, metric_list = \"all\" )"},{"path":"/reference/performance_metric_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute all Performance Metrics — performance_metric_summary","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) dem_params demographic parameters matrices OM ref_naa reference age structure ABI computation hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data metric_list vector names performance metrics compute - `avg_catch` -> average annual catch - `tot_catch` -> total catch - `prop_years_high_catch` -> proportion years catch exceeds threshold - `avg_ssb` -> average ssb - `prop_years_lowssb` -> proportion years SSB threshold - `avg_age` -> average age population - `avg_abi` -> average ABI population (Griffiths et al. 2023) - `avg_variation` -> average annual catch variation - `avg_catch_lg` -> average proportion catch \"large\" - `avg_pop_old` -> average proportion population \"old\" - `annual_value` -> annual relative value - `dynamic_value` -> annual dynamic value - `crash_time` -> number years required population delcine 0.2B0 - `recovery_time` -> number years required population exceed 0.4B0 - `` -> compute metrics","code":""},{"path":"/reference/performance_metric_summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute all Performance Metrics — performance_metric_summary","text":"list dataframes. One element individual metric, one element metrics","code":""},{"path":"/reference/plot_abc_tac.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Trajectories of ABC, TAC, Expected Landings, and Attainment — plot_abc_tac","title":"Plot Trajectories of ABC, TAC, Expected Landings, and Attainment — plot_abc_tac","text":"Plot median trajectory management quantitoes across simulations line plots.","code":""},{"path":"/reference/plot_abc_tac.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Trajectories of ABC, TAC, Expected Landings, and Attainment — plot_abc_tac","text":"","code":"plot_abc_tac( data, v1 = \"hcr\", v2 = NA, common_trajectory = 64, interval_widths = c(0.5, 0.8), base_hcr = \"F40\", highlight = NULL )"},{"path":"/reference/plot_abc_tac.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Trajectories of ABC, TAC, Expected Landings, and Attainment — plot_abc_tac","text":"data tibble output `get_management_quantities()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") common_trajectory year plot vertical dashed line indicate MSE projection period begins base_hcr HCR plot thicker line reference (must match names `extra_columns`) highlight vector HCRs highlight color (must match names `extra_columns`) v3 variable facet addition v2 (e.g. \"om\")","code":""},{"path":"/reference/plot_average_age.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Trajectory of Average Population Age — plot_average_age","title":"Plot Trajectory of Average Population Age — plot_average_age","text":"Plot median trajectory average population age across simulations line plot.","code":""},{"path":"/reference/plot_average_age.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Trajectory of Average Population Age — plot_average_age","text":"","code":"plot_average_age( data, v1 = \"hcr\", v2 = NA, v3 = NA, common_trajectory = 54, time_horizon = NULL, interval_widths = c(0.5, 0.8), base_hcr = \"F40\", highlight = NULL, relative = NA )"},{"path":"/reference/plot_average_age.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Trajectory of Average Population Age — plot_average_age","text":"data tibble output `get_average_age()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") v3 variable facet addition v2 (e.g. \"om\") common_trajectory year plot vertical dashed line indicate MSE projection period begins base_hcr HCR plot thicker line reference (must match names `extra_columns`) highlight vector HCRs highlight color (must match names `extra_columns`) relative whether relativize average age specific HCR (must match names `extra_columns`)","code":""},{"path":"/reference/plot_dynamic_economic_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Trajectory of Dynamic Economic Value — plot_dynamic_economic_value","title":"Plot Trajectory of Dynamic Economic Value — plot_dynamic_economic_value","text":"Plot median trajectory economic value fixed gear fleet across simulations line plot. See `get_dynamic_economic_value()` details economic value calculated.","code":""},{"path":"/reference/plot_dynamic_economic_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Trajectory of Dynamic Economic Value — plot_dynamic_economic_value","text":"","code":"plot_dynamic_economic_value( data, v1 = \"hcr\", v2 = NA, v3 = NA, common_trajectory = 54, interval_widths = c(0.5, 0.8), base_hcr = \"F40\", highlight = NULL, relative = NA )"},{"path":"/reference/plot_dynamic_economic_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Trajectory of Dynamic Economic Value — plot_dynamic_economic_value","text":"data tibble output `get_dynamic_economic_value()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") v3 variable facet addition v2 (e.g. \"om\") common_trajectory year plot vertical dashed line indicate MSE projection period begins base_hcr HCR plot thicker line reference (must match names `extra_columns`) highlight vector HCRs highlight color (must match names `extra_columns`) relative whether relativize economic value specific HCR (must match names `extra_columns`)","code":""},{"path":"/reference/plot_fishing_mortalities.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Trajectory of Fishing Mortality — plot_fishing_mortalities","title":"Plot Trajectory of Fishing Mortality — plot_fishing_mortalities","text":"Plot median trajectory total fishing mortality across simulations line plot.","code":""},{"path":"/reference/plot_fishing_mortalities.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Trajectory of Fishing Mortality — plot_fishing_mortalities","text":"","code":"plot_fishing_mortalities( data, v1 = \"hcr\", v2 = NA, v3 = NA, show_est = FALSE, common_trajectory = 64, interval_widths = c(0.5, 0.8), base_hcr = \"F40\", highlight = NULL )"},{"path":"/reference/plot_fishing_mortalities.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Trajectory of Fishing Mortality — plot_fishing_mortalities","text":"data tibble output `get_fishing_mortalities()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") v3 variable facet addition v2 (e.g. \"om\") show_est whether show estimated SSB EM point ranges common_trajectory year plot vertical dashed line indicate MSE projection period begins base_hcr HCR plot thicker line reference (must match names `extra_columns`) highlight vector HCRs highlight color (must match names `extra_columns`)","code":""},{"path":"/reference/plot_landed_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Trajectory of Landed Catch — plot_landed_catch","title":"Plot Trajectory of Landed Catch — plot_landed_catch","text":"Plot median trajectory total landed catch across simulations line plot.","code":""},{"path":"/reference/plot_landed_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Trajectory of Landed Catch — plot_landed_catch","text":"","code":"plot_landed_catch( data, v1 = \"hcr\", v2 = NA, v3 = NA, by_fleet = FALSE, common_trajectory = 64, base_hcr = \"F40\", highlight = NULL )"},{"path":"/reference/plot_landed_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Trajectory of Landed Catch — plot_landed_catch","text":"data tibble output `get_landed_catch()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") v3 variable facet addition v2 (e.g. \"om\") common_trajectory year plot vertical dashed line indicate MSE projection period begins base_hcr HCR plot thicker line reference (must match names `extra_columns`) highlight vector HCRs highlight color (must match names `extra_columns`)","code":""},{"path":"/reference/plot_performance_metric_summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Summary of Performance Metrics — plot_performance_metric_summary","title":"Plot Summary of Performance Metrics — plot_performance_metric_summary","text":"Plot summary performance metrics across simulation point intervals.","code":""},{"path":"/reference/plot_performance_metric_summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Summary of Performance Metrics — plot_performance_metric_summary","text":"","code":"plot_performance_metric_summary( perf_data, v1 = \"hcr\", v2 = \"om\", is_relative = FALSE, highlight = NULL )"},{"path":"/reference/plot_performance_metric_summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Summary of Performance Metrics — plot_performance_metric_summary","text":"perf_data tibble output `performance_metric_summary()` v1 variable map y-axis (e.g. \"hcr\") v2 variable facet (e.g. \"om\") is_relative whether performance metrics relativized specific HCR highlight vector HCRs highlight color (must match names `extra_columns`)","code":""},{"path":"/reference/plot_recruitment.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Trajectory of Recruitment — plot_recruitment","title":"Plot Trajectory of Recruitment — plot_recruitment","text":"Plot median trajectory recruitment across simulations line plot.","code":""},{"path":"/reference/plot_recruitment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Trajectory of Recruitment — plot_recruitment","text":"","code":"plot_recruitment( data, v1 = \"hcr\", v2 = NA, v3 = NA, show_est = FALSE, common_trajectory = 64, interval_widths = c(0.5, 0.8), base_hcr = \"F40\", highlight = NULL )"},{"path":"/reference/plot_recruitment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Trajectory of Recruitment — plot_recruitment","text":"data tibble output `get_recruits()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") v3 variable facet addition v2 (e.g. \"om\") show_est whether show estimated SSB EM point ranges common_trajectory year plot vertical dashed line indicate MSE projection period begins base_hcr HCR plot thicker line reference (must match names `extra_columns`) highlight vector HCRs highlight color (must match names `extra_columns`)","code":""},{"path":"/reference/plot_ssb.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Trajectory of Spawning Biomass — plot_ssb","title":"Plot Trajectory of Spawning Biomass — plot_ssb","text":"Plot median trajectory SSB across simulations line plot.","code":""},{"path":"/reference/plot_ssb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Trajectory of Spawning Biomass — plot_ssb","text":"","code":"plot_ssb( data, v1 = \"hcr\", v2 = NA, v3 = NA, show_est = FALSE, common_trajectory = 64, base_hcr = \"F40\", relative = NA, highlight = NULL )"},{"path":"/reference/plot_ssb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Trajectory of Spawning Biomass — plot_ssb","text":"data tibble output `get_ssb_biomass()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") v3 variable facet addition v2 (e.g. \"om\") show_est whether show estimated SSB EM point ranges common_trajectory year plot vertical dashed line indicate MSE projection period begins base_hcr HCR plot thicker line reference (must match names `extra_columns`) relative whether relativize SSB specific HCR (must match names `extra_columns`) highlight vector HCRs highlight color (must match names `extra_columns`)","code":""},{"path":"/reference/plot_ssb_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Trajectories of Spawning Biomass and Landed Catch — plot_ssb_catch","title":"Plot Trajectories of Spawning Biomass and Landed Catch — plot_ssb_catch","text":"Plot median trajectory total landed catch SSB across simulations line plots.","code":""},{"path":"/reference/plot_ssb_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Trajectories of Spawning Biomass and Landed Catch — plot_ssb_catch","text":"","code":"plot_ssb_catch( ssb_data, catch_data, v1 = \"hcr\", v2 = NA, v3 = NA, common_trajectory = 64, base_hcr = \"F40\", flip_facet = FALSE, highlight = NULL )"},{"path":"/reference/plot_ssb_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Trajectories of Spawning Biomass and Landed Catch — plot_ssb_catch","text":"ssb_data tibble output `get_ssb_biomass()` catch_data tibble output `get_landed_catch()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") v3 variable facet addition v2 (e.g. \"om\") common_trajectory year plot vertical dashed line indicate MSE projection period begins base_hcr HCR plot thicker line reference (must match names `extra_columns`) highlight vector HCRs highlight color (must match names `extra_columns`)","code":""},{"path":"/reference/plot_timeseries.html","id":null,"dir":"Reference","previous_headings":"","what":"Generialize Timeseries Plotting Function — plot_timeseries","title":"Generialize Timeseries Plotting Function — plot_timeseries","text":"General function plotting timeseries management quantities (e.g. SSB, catch, ABC, TAC) options faceting highlighting specific HCRs.","code":""},{"path":"/reference/plot_timeseries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generialize Timeseries Plotting Function — plot_timeseries","text":"","code":"plot_timeseries( data, v1 = \"hcr\", v2 = NA, v3 = NA, common_trajectory = 54, interval_widths = c(0.5, 0.8), base_hcr = \"F40\", ylab = \"\", highlight = NULL )"},{"path":"/reference/plot_timeseries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generialize Timeseries Plotting Function — plot_timeseries","text":"data tibble summarised `median_qi()` reformatted `reformat_ggdist_long()` v1 variable map color (e.g. \"hcr\") v2 variable facet (e.g. \"om\") v3 variable facet addition v2 (e.g. \"om\") common_trajectory year plot vertical dashed line indicate MSE projection period begins interval_widths vector credible interval widths plot (e.g. c(0.50, 0.80)) base_hcr HCR plot thicker line reference (must match names `extra_columns`) ylab label y-axis highlight vector HCRs highlight color (must match names `extra_columns`)","code":""},{"path":"/reference/process_big_outputs.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Large MSE Output Data — process_big_outputs","title":"Process Large MSE Output Data — process_big_outputs","text":"Process large MSE output data stored multiple RDS files \"data/active\" list model run objects. Applies processing function model run's output variable, combines results single tibble.","code":""},{"path":"/reference/process_big_outputs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Large MSE Output Data — process_big_outputs","text":"","code":"process_big_outputs( model_runs, var, extra_columns, hcr_filter, om_filter, process_func, ... )"},{"path":"/reference/process_big_outputs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Large MSE Output Data — process_big_outputs","text":"model_runs list MSE model run objects (created via `run_mse(...)`) NULL read RDS files \"data/active\" var output variable model run objects extra_columns data.frame extra column names values add tibble (ignored reading RDS files) process_func function apply model runs' output variable ... additional arguments pass `process_func`","code":""},{"path":"/reference/process_big_outputs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Large MSE Output Data — process_big_outputs","text":"tibble processed MSE output data","code":""},{"path":"/reference/process_big_outputs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process Large MSE Output Data — process_big_outputs","text":"necessary total size spatial MSE output data objects generally exceeds available memory, must processed chunks. reading RDS files, files processed parallel using ncores-2 cores.","code":""},{"path":"/reference/prop_fully_mature.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute proportion of population that is fully mature — prop_fully_mature","title":"Compute proportion of population that is fully mature — prop_fully_mature","text":"Calculate proportion population age classes \"fully mature\" (e.g. mat > 0.995).","code":""},{"path":"/reference/prop_fully_mature.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute proportion of population that is fully mature — prop_fully_mature","text":"","code":"prop_fully_mature(naa, mat)"},{"path":"/reference/prop_fully_mature.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute proportion of population that is fully mature — prop_fully_mature","text":"naa numbers--age vector mat maturity--age vector","code":""},{"path":"/reference/prop_low_biomass.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute proportion of years SSB is below a threshold level across projection period — prop_low_biomass","title":"Compute proportion of years SSB is below a threshold level across projection period — prop_low_biomass","text":"Compute average proportion years SSB 0.4*SSB0 (median CIs) across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/prop_low_biomass.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute proportion of years SSB is below a threshold level across projection period — prop_low_biomass","text":"","code":"prop_low_biomass( model_runs, extra_columns, dem_params, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(55, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/prop_low_biomass.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute proportion of years SSB is below a threshold level across projection period — prop_low_biomass","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute time_horizon periof years calculate metric extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/prop_mature.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute proportion of a population that is mature — prop_mature","title":"Compute proportion of a population that is mature — prop_mature","text":"Calculate proportion population reached maturity given age structure maturity schedule.","code":""},{"path":"/reference/prop_mature.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute proportion of a population that is mature — prop_mature","text":"","code":"prop_mature(naa, mat)"},{"path":"/reference/prop_mature.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute proportion of a population that is mature — prop_mature","text":"naa numbers--age vector mat maturity--age vector","code":""},{"path":"/reference/prop_years_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute proportion of years catch exceeds a threshold level across projection period — prop_years_catch","title":"Compute proportion of years catch exceeds a threshold level across projection period — prop_years_catch","text":"Compute average proportion years catch exceeds threshold level (median CIs) per year across years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/prop_years_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute proportion of years catch exceeds a threshold level across projection period — prop_years_catch","text":"","code":"prop_years_catch( model_runs, extra_columns, hcr_filter, om_filter, catch_threshold, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/prop_years_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute proportion of years catch exceeds a threshold level across projection period — prop_years_catch","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""},{"path":"/reference/recruits_crash.html","id":null,"dir":"Reference","previous_headings":"","what":"Recruitment function with a specified crash period — recruits_crash","title":"Recruitment function with a specified crash period — recruits_crash","text":"Generate future recruitment timeseries via historical reasampling, (see `resample_recruits`) set specific time period projected recruitment different values. Can used specify \"crash\" recruitment, \"spike\" recruitment depending `crash_value`.","code":""},{"path":"/reference/recruits_crash.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Recruitment function with a specified crash period — recruits_crash","text":"","code":"recruits_crash( crash_start_year, crash_length, crash_value, hist_recruits, nyears, seed )"},{"path":"/reference/recruits_crash.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Recruitment function with a specified crash period — recruits_crash","text":"crash_length number years \"crashed\" recruitment crash_value recruitment \"crash\" period hist_recruits historical timeseries recruitment (deviates) nyears total number years resample seed random seed reproducability crash_start_years projection year start recruitment crash","code":""},{"path":"/reference/reformat_ggdist_long.html","id":null,"dir":"Reference","previous_headings":"","what":"Change a `ggdist` Tibble to Long Format — reformat_ggdist_long","title":"Change a `ggdist` Tibble to Long Format — reformat_ggdist_long","text":"Pivot summary tibble `ggdist` multiple summary variables long format. Summary variable names pivoted 'name' column, corresponding 'median', 'lower', 'upper' columns contain computed quantile values.","code":""},{"path":"/reference/reformat_ggdist_long.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Change a `ggdist` Tibble to Long Format — reformat_ggdist_long","text":"","code":"reformat_ggdist_long(data, n = 1)"},{"path":"/reference/reformat_ggdist_long.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Change a `ggdist` Tibble to Long Format — reformat_ggdist_long","text":"data tibble output `ggdist` summary function (e.g. `ggdist:median_qi(...)`) n number grouping variables used (default: 1)","code":""},{"path":"/reference/reformat_ggdist_long.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Change a `ggdist` Tibble to Long Format — reformat_ggdist_long","text":"long format tibble columns median, lower, upper","code":""},{"path":"/reference/reformat_ggdist_long.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Change a `ggdist` Tibble to Long Format — reformat_ggdist_long","text":"Intended use plotting distributions multiple variables simultaneously.","code":""},{"path":"/reference/regime_recruits.html","id":null,"dir":"Reference","previous_headings":"","what":"Regime-like recruitment — regime_recruits","title":"Regime-like recruitment — regime_recruits","text":"Generate future recruitment timeseries based mean CV distinct regimes, via lognormal distribution.","code":""},{"path":"/reference/regime_recruits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regime-like recruitment — regime_recruits","text":"","code":"regime_recruits(mus, cvs, nyears, regime_length, starting_regime, seed)"},{"path":"/reference/regime_recruits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regime-like recruitment — regime_recruits","text":"mus vector mean recruitment regime cvs vector CV recruitment regime (CVs converted internally log SD) nyears total number years resample regime_length vector inidcating long regime last (limited 2 regimes) starting_regime regime start (0 = first regime, 1 = second regime) seed random seed reproducability","code":""},{"path":"/reference/relativize_performance.html","id":null,"dir":"Reference","previous_headings":"","what":"Relativize Performance Values to a Specific Referecnce HCR — relativize_performance","title":"Relativize Performance Values to a Specific Referecnce HCR — relativize_performance","text":"Convert raw performance metric values relative performance values dividing performance metric value specific reference HCR. allows easier comparison performance across HCRs, relative performance values common scale.","code":""},{"path":"/reference/relativize_performance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relativize Performance Values to a Specific Referecnce HCR — relativize_performance","text":"","code":"relativize_performance(data, rel_column, value_column, rel_value, grouping)"},{"path":"/reference/relativize_performance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Relativize Performance Values to a Specific Referecnce HCR — relativize_performance","text":"data tibble performance metric data rel_column name column containing HCR names value_column name column containing performance metric values rel_value name reference HCR relativize grouping vector column names group relativizing (e.g. \"om\", \"time\", \"sim\")","code":""},{"path":"/reference/resample_recruits.html","id":null,"dir":"Reference","previous_headings":"","what":"Resample recruitment from historical timeseries\n#'\nResample, with replacement, the historical recruitment timeseries. — resample_recruits","title":"Resample recruitment from historical timeseries\n#'\nResample, with replacement, the historical recruitment timeseries. — resample_recruits","text":"Resample recruitment historical timeseries #' Resample, replacement, historical recruitment timeseries.","code":""},{"path":"/reference/resample_recruits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Resample recruitment from historical timeseries\n#'\nResample, with replacement, the historical recruitment timeseries. — resample_recruits","text":"","code":"resample_recruits(hist_recruits, nyears, seed)"},{"path":"/reference/resample_recruits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Resample recruitment from historical timeseries\n#'\nResample, with replacement, the historical recruitment timeseries. — resample_recruits","text":"hist_recruits historical timeseries recruitment (deviates) nyears total number years resample seed random seed reproducability","code":""},{"path":"/reference/resample_regime_recruits.html","id":null,"dir":"Reference","previous_headings":"","what":"Regime-like recruitment\n#'\nGenerate future recruitment timeseries based on historcial regime-like \nrecruitment dynamics. Historical recruitments identified as having belonged\nto a specific regime are randomly resampled, with replacement. — resample_regime_recruits","title":"Regime-like recruitment\n#'\nGenerate future recruitment timeseries based on historcial regime-like \nrecruitment dynamics. Historical recruitments identified as having belonged\nto a specific regime are randomly resampled, with replacement. — resample_regime_recruits","text":"Regime-like recruitment #' Generate future recruitment timeseries based historcial regime-like recruitment dynamics. Historical recruitments identified belonged specific regime randomly resampled, replacement.","code":""},{"path":"/reference/resample_regime_recruits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regime-like recruitment\n#'\nGenerate future recruitment timeseries based on historcial regime-like \nrecruitment dynamics. Historical recruitments identified as having belonged\nto a specific regime are randomly resampled, with replacement. — resample_regime_recruits","text":"","code":"resample_regime_recruits( regime1_recruits, regime2_recruits, nyears, regime_length, starting_regime, seed )"},{"path":"/reference/resample_regime_recruits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regime-like recruitment\n#'\nGenerate future recruitment timeseries based on historcial regime-like \nrecruitment dynamics. Historical recruitments identified as having belonged\nto a specific regime are randomly resampled, with replacement. — resample_regime_recruits","text":"regime1_recruits historical recruitments first regime regime2_recruits historical recruitments second regime nyears total number years resample regime_length vector inidcating long regime last (limited 2 regimes) starting_regime regime start (0 = first regime, 1 = second regime) seed random seed reproducability","code":""},{"path":"/reference/round_to_zero.html","id":null,"dir":"Reference","previous_headings":"","what":"Round dataframe column to Zero — round_to_zero","title":"Round dataframe column to Zero — round_to_zero","text":"Rounds data dataframe column 0 certain threshold. Also rounds non finite values 0 automatically.","code":""},{"path":"/reference/round_to_zero.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round dataframe column to Zero — round_to_zero","text":"","code":"round_to_zero(data, col_name, zero_threshold = 0.01)"},{"path":"/reference/round_to_zero.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round dataframe column to Zero — round_to_zero","text":"data dataframe processed MSE data col_name name data column round zero_threshold threshold round zero","code":""},{"path":"/reference/run_EM.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Estimation Method — run_EM","title":"Run Estimation Method — run_EM","text":"Given OM object succesfull MSE run, apply EM observation data generated MSE.","code":""},{"path":"/reference/run_EM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Estimation Method — run_EM","text":"","code":"run_EM( s, sable_om, mse_tier3, nyears, om_name, model_name = \"CurrentAssessment\", fix_pars = NA )"},{"path":"/reference/run_EM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Estimation Method — run_EM","text":"s simulation seed sable_om om object mse_tier3 mse object om string identifed OM","code":""},{"path":"/reference/run_mse.html","id":null,"dir":"Reference","previous_headings":"","what":"Run Management Strategy Evaluation — run_mse","title":"Run Management Strategy Evaluation — run_mse","text":"Run MSE simulation loop.","code":""},{"path":"/reference/run_mse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run Management Strategy Evaluation — run_mse","text":"","code":"run_mse(om, mp, mse_options, nyears_input = NA, seed = 1120, file_suffix = \"\")"},{"path":"/reference/run_mse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run Management Strategy Evaluation — run_mse","text":"om operating model list object (minimally contain list object demographic parameters, array initial NAAs, list object specifying recruitment, list model_options). mp list object specifying management procedure applied projection period nyears_input number years simulate forward (override dimensions demagraphic parameters matrices defined OM) seed random seed ... parameters pass `hcr` function run_estimation whether run estimation procedure . FALSE, management procedures use OM outputs rather EM estimates compute future harvest management procedure function. spinup_years number years estimation process begin","code":""},{"path":"/reference/run_mse_multiple.html","id":null,"dir":"Reference","previous_headings":"","what":"Run MSE Simulations Across OMs and HCRs — run_mse_multiple","title":"Run MSE Simulations Across OMs and HCRs — run_mse_multiple","text":"Wrapper function around `run_mse` `run_mse_parallel` allows simple running MSE simulations across multiple OMs HCRs (combinations two). wrapper relies using `expand.grid` create factorial combination OMs HCRs runs MSE simulations across combinations.","code":""},{"path":"/reference/run_mse_multiple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run MSE Simulations Across OMs and HCRs — run_mse_multiple","text":"","code":"run_mse_multiple( om_list, hcr_list, seed_list, mse_options_list, nyears, diagnostics = FALSE, save = FALSE )"},{"path":"/reference/run_mse_multiple.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run MSE Simulations Across OMs and HCRs — run_mse_multiple","text":"om_list named list operating model list objects hcr_list named list harvest control rule list objects seed_list vector random seeds mse_options list mse_options objects apply OM. Must either length 1, length == length(om_list). ... additional parameters pass `run_mse` call","code":""},{"path":"/reference/run_mse_multiple.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run MSE Simulations Across OMs and HCRs — run_mse_multiple","text":"list MSE simualtion results","code":""},{"path":"/reference/sable_om.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Operating Model for Alaska Sablefish — sable_om","title":"Default Operating Model for Alaska Sablefish — sable_om","text":"Dataset containing demographic matrices, observation process parameters, initial numbers--age alaska sablefish population. data used base operating models used package.","code":""},{"path":"/reference/sable_om.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Operating Model for Alaska Sablefish — sable_om","text":"","code":"sable_om"},{"path":"/reference/sable_om.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Default Operating Model for Alaska Sablefish — sable_om","text":"list containing OM components","code":""},{"path":"/reference/sablefish_assessment_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Sablefish assessment — sablefish_assessment_data","title":"Sablefish assessment — sablefish_assessment_data","text":"dataset containing sablefish assessment results. data used defining historical recruitment timeseries.","code":""},{"path":"/reference/sablefish_assessment_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sablefish assessment — sablefish_assessment_data","text":"","code":"sablefish_assessment_data"},{"path":"/reference/sablefish_assessment_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Sablefish assessment — sablefish_assessment_data","text":"list containing assessment data","code":""},{"path":"/reference/scale_and_rank.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale and Rank dataframe columns within groups — scale_and_rank","title":"Scale and Rank dataframe columns within groups — scale_and_rank","text":"Computes 0-1 scaled version dataframe column, within groups, ranks (1-N) entries within group based scaled values (1 highest -group scaled value, N lowest -group scaled value).","code":""},{"path":"/reference/scale_and_rank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale and Rank dataframe columns within groups — scale_and_rank","text":"","code":"scale_and_rank(data, col_name)"},{"path":"/reference/scale_and_rank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale and Rank dataframe columns within groups — scale_and_rank","text":"data dataframe processed MSE data col_name name data column scale rank","code":""},{"path":"/reference/scale_and_rank.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scale and Rank dataframe columns within groups — scale_and_rank","text":"Intended use performance metric data . Note \"Catch AAV, \"Proportion Years Low SSB\", \"Recovery Time\" performance metrics use inverse ranking system (smaller scaled values better), intention minimize metrics.","code":""},{"path":"/reference/setup_hcr_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Setup HCR Objects — setup_hcr_options","title":"Setup HCR Objects — setup_hcr_options","text":"Set HCR object list items NULL defaults","code":""},{"path":"/reference/setup_hcr_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setup HCR Objects — setup_hcr_options","text":"","code":"setup_hcr_options()"},{"path":"/reference/setup_mp_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Setup Management Procedure Object — setup_mp_options","title":"Setup Management Procedure Object — setup_mp_options","text":"Set MP object list items reasonable default values.","code":""},{"path":"/reference/setup_mp_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setup Management Procedure Object — setup_mp_options","text":"","code":"setup_mp_options()"},{"path":"/reference/setup_mse_options.html","id":null,"dir":"Reference","previous_headings":"","what":"Setup MSE Options Object — setup_mse_options","title":"Setup MSE Options Object — setup_mse_options","text":"Set MSE optios list items reasonable default values.","code":""},{"path":"/reference/setup_mse_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setup MSE Options Object — setup_mse_options","text":"","code":"setup_mse_options()"},{"path":"/reference/shannon_diversity.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Shannon Diversity Index (H') — shannon_diversity","title":"Compute Shannon Diversity Index (H') — shannon_diversity","text":"Calculate Shannon diversity index (H') (Shannon Weaver, 1949) give numbers age vector.","code":""},{"path":"/reference/shannon_diversity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Shannon Diversity Index (H') — shannon_diversity","text":"","code":"shannon_diversity(naa)"},{"path":"/reference/shannon_diversity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Shannon Diversity Index (H') — shannon_diversity","text":"naa numbers--age vector","code":""},{"path":"/reference/shannon_diversity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute Shannon Diversity Index (H') — shannon_diversity","text":"H' = sum(naa*log(naa))","code":""},{"path":"/reference/simulate_TAC.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate Total Allowable Catch Projections — simulate_TAC","title":"Simulate Total Allowable Catch Projections — simulate_TAC","text":"Determine total allowable catch (TAC) next simulation year based fishing mortality rate identified harvest control rule (HCR). TAC computed projecting population forward one year specific level F computing amount catch taken projected population structure based joint fishery selectivity curve.","code":""},{"path":"/reference/simulate_TAC.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate Total Allowable Catch Projections — simulate_TAC","text":"","code":"simulate_TAC( hcr_F, naa, recruitment, joint_sel, dem_params, hist_abc, hcr_options, options )"},{"path":"/reference/simulate_TAC.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate Total Allowable Catch Projections — simulate_TAC","text":"hcr_F fishing mortality rate identified HCR naa numbers--age vector (dimensions [1, nages, nsexes, nregions]) recruitment projected recruitment next year dem_params demographic parameter matrices subsetted 1 year hcr_options list additional management options stability constraints harvest caps options list additional ABC/TAC simulation options ABC-TAC reduction levels attainment functions. join_sel joint fishery selectivity hist_tac TAC previous year","code":""},{"path":"/reference/simulate_em_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate OM Observation Data for TMB Assessment Model — simulate_em_data","title":"Simulate OM Observation Data for TMB Assessment Model — simulate_em_data","text":"Format data observations `afscOM` operating model update model data parameters required `SpatialSablefishAssessment` TMB assessment model.","code":""},{"path":"/reference/simulate_em_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate OM Observation Data for TMB Assessment Model — simulate_em_data","text":"","code":"simulate_em_data( nyears, dem_params, land_caa, survey_indices, fxfish_caa_obs, twfish_caa_obs, ll_ac_obs, tw_ac_obs, ll_srv_indic, tw_srv_indic, model_options, added_years = 1, file_suffix = \"\" )"},{"path":"/reference/simulate_em_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate OM Observation Data for TMB Assessment Model — simulate_em_data","text":"nyears number years data passed model dem_params demographic parameter matrices subsetted 1 year land_caa nyears worth landed catch--age data (dimensins [1, nages, nsexes, nregions, nfleets]) survey_indices nyears worth survey indices (LL RPN, LL RPW, TW RPW) fxfish_caa_obs nyears worth catch--age observation fixed gear fishery twfish_caa_obs nyears worth catch--age observation trawl gear fishery ll_ac_obs nyears worth age composition observations frmo longline survey tw_ac_obs nyears worth age composition observations frmo trawl survey model_options list model options provided OM file_suffix suffix append saved outputs added_year number new years data added (usually 1)","code":""},{"path":"/reference/simulate_em_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simulate OM Observation Data for TMB Assessment Model — simulate_em_data","text":"function requires existence 'data/sablefish_em_data_2022.RDS', 'data/sablefish_em_par_2022.RDS' files, come packaged `SablefishMSE` codebase.","code":""},{"path":"/reference/simulate_em_data_sex_disaggregate.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate OM Observation Data for Sex-Disaggregated TMB Assessment Model — simulate_em_data_sex_disaggregate","title":"Simulate OM Observation Data for Sex-Disaggregated TMB Assessment Model — simulate_em_data_sex_disaggregate","text":"Format data observations `afscOM` operating model update model data parameters required `SpatialSablefishAssessment` TMB assessment model. Age composition data properly formatted use sex-disaggregated \"proportions across\" approch used TMB estimation model.","code":""},{"path":"/reference/simulate_em_data_sex_disaggregate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate OM Observation Data for Sex-Disaggregated TMB Assessment Model — simulate_em_data_sex_disaggregate","text":"","code":"simulate_em_data_sex_disaggregate( nyears, dem_params, land_caa, survey_indices, fxfish_caa_obs, twfish_caa_obs, ll_ac_obs, tw_ac_obs, ll_srv_indic, tw_srv_indic, model_options, added_years = 1, file_suffix = \"\" )"},{"path":"/reference/simulate_em_data_sex_disaggregate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate OM Observation Data for Sex-Disaggregated TMB Assessment Model — simulate_em_data_sex_disaggregate","text":"nyears number years data passed model dem_params demographic parameter matrices subsetted 1 year land_caa nyears worth landed catch--age data (dimensins [1, nages, nsexes, nregions, nfleets]) survey_indices nyears worth survey indices (LL RPN, LL RPW, TW RPW) fxfish_caa_obs nyears worth catch--age observation fixed gear fishery twfish_caa_obs nyears worth catch--age observation trawl gear fishery ll_ac_obs nyears worth age composition observations frmo longline survey tw_ac_obs nyears worth age composition observations frmo trawl survey model_options list model options provided OM file_suffix suffix append saved outputs added_year number new years data added (usually 1)","code":""},{"path":"/reference/simulate_em_data_sex_disaggregate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simulate OM Observation Data for Sex-Disaggregated TMB Assessment Model — simulate_em_data_sex_disaggregate","text":"function requires existence 'data/sablefish_em_data_2022.RDS', 'data/sablefish_em_par_2022.RDS' files, come packaged `SablefishMSE` codebase.","code":""},{"path":[]},{"path":"/reference/stairstep_attainment.html","id":null,"dir":"Reference","previous_headings":"","what":"Stairstep Attainment Function — stairstep_attainment","title":"Stairstep Attainment Function — stairstep_attainment","text":"Defines attainment level based three stepped function, optional phase ins periods linear combination stairsteps applied. Attainment assumed function established TAC.","code":""},{"path":"/reference/stairstep_attainment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stairstep Attainment Function — stairstep_attainment","text":"","code":"stairstep_attainment(v, breakpoints, levels, phase_ins)"},{"path":"/reference/stairstep_attainment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stairstep Attainment Function — stairstep_attainment","text":"v total allowable catch (TAC) level breakpoints TAC levels define transition attainment level occurs levels attainment levels associated set breakpoints (0 - breakpoint[1], breakpoinut[1]-breakpoint[2], breakpoint[2] - Inf) phase_ins optional phase_in width. specified, phase ins begin talking effect phase_ins/2 breakpoints value end phase_ins/2 breakpoint value.","code":""},{"path":"/reference/threshold_cap.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute F following a threshold rule, with a cap at B/B_ref = 1 — threshold_cap","title":"Compute F following a threshold rule, with a cap at B/B_ref = 1 — threshold_cap","text":"Compute F following threshold rule, cap B/B_ref = 1","code":""},{"path":"/reference/threshold_cap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute F following a threshold rule, with a cap at B/B_ref = 1 — threshold_cap","text":"","code":"threshold_cap(ssb, B_ref, F_ref, alpha, beta = 1)"},{"path":"/reference/threshold_cap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute F following a threshold rule, with a cap at B/B_ref = 1 — threshold_cap","text":"ssb Value SSB B_ref Value biomass based reference point (e.g., B40) F_ref Value fishing mortality based reference point (e.g., F40) alpha Cutoff set F 0","code":""},{"path":"/reference/threshold_cap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute F following a threshold rule, with a cap at B/B_ref = 1 — threshold_cap","text":"fishing mortality rate","code":""},{"path":"/reference/threshold_f.html","id":null,"dir":"Reference","previous_headings":"","what":"Generic threshold F harvest control rule\n#'\nA generic 4 parameters threshold F HCR. — threshold_f","title":"Generic threshold F harvest control rule\n#'\nA generic 4 parameters threshold F HCR. — threshold_f","text":"Generic threshold F harvest control rule #' generic 4 parameters threshold F HCR.","code":""},{"path":"/reference/threshold_f.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generic threshold F harvest control rule\n#'\nA generic 4 parameters threshold F HCR. — threshold_f","text":"","code":"threshold_f(x, f_min, f_max, lrp, urp)"},{"path":"/reference/threshold_f.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generic threshold F harvest control rule\n#'\nA generic 4 parameters threshold F HCR. — threshold_f","text":"x input HCR (e.g. SSB , SSB/B40) f_min F use x < lrp f_max F use x > urp lrp value x f_min applies urp value x f_max applies","code":""},{"path":"/reference/threshold_f.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generic threshold F harvest control rule\n#'\nA generic 4 parameters threshold F HCR. — threshold_f","text":"fishing mortality rate","code":""},{"path":"/reference/total_catch.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute Total Catch over projection period — total_catch","title":"Compute Total Catch over projection period — total_catch","text":"Compute total catch (median CIs) years simulation seeds, combination operating models management procedures.","code":""},{"path":"/reference/total_catch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute Total Catch over projection period — total_catch","text":"","code":"total_catch( model_runs, extra_columns, hcr_filter, om_filter, interval_widths = c(0.5, 0.8), time_horizon = c(65, NA), extra_filter = NULL, relative = NULL, summarise_by = c(\"om\", \"hcr\"), summary_out = TRUE )"},{"path":"/reference/total_catch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute Total Catch over projection period — total_catch","text":"model_runs list completed MSE simulations runs extra_columns data.frame specifying names OM HCR attach model_run (see `bind_mse_outputs` details) hcr_filter vector HCR names calculate metric om_filter vector OM names calculate metric interval_widths confidence intevrals compute extra_filter additional set filters apply computing medians confidence intervals relative management procedure compute metric relative summarise_by vector columns summarise metric summary_out whether output data summarised `ggdist` full data","code":""}]