This document was compiled in RMarkdown, and shows the
incremental results of the Chilean Jack Mackerel (Trachurus
murphyi) stock assessment benchmark in 2022. The files associated
with this document can be found on Github.
Annoted data files can be found in the Excel spreadsheet
newAge.xlsx on jjm/assessment/data.
jjm/src/jjms.tpl
jjm/src folder in
your Terminal, and using the make commandjjmR package
R using the command
remotes::install_github("SPRFMO/jjmR")File naming conventions have been changed to reflect the stock
structure hypotheses associated with each run. The h1
denotes the single-stock hypothesis, while h2 denotes the
two-stock one.
| Model | Description |
|---|---|
| 0.00 | Exact 2021 (single stock h1 and two-stock
h2) model and data set through 2020 (mod1.0 from SC09) |
| 0.01 | As 0.00 but with the model beginning at age-0. |
| 0.02 | As 0.01 but replacing previous age data with updated data; mean stock weight at age calculated as a mean from SC_Chile 4th quarter, 1995-2020; natural mortality set to 0.25; updated growth rates to new Chilean values; downweighting DEPM. |
| 0.03 | As 0.00 but replacing previous age data with updated data; mean stock weight at age calculated as a mean from SC_Chile 4th quarter, 1995-2020; natural mortality set to 0.25; updated growth rates to new Chilean values; downweighting DEPM. |
| —- | —- |
| 1.00 | As 0.03 |
| 1.01 | As 1.00 but with Peruvian growth parameters for the single-stock model. (ED) |
| 1.02 | As 1.00 but with age-varying M (Gislason method; scaled to 0.25). (NH) |
| 1.03 | As 1.00 but with the new offshore CPUE index that incorporates effort creep. (MP) |
| 1.04 | As 1.00 but with pre-weighted sample sizes for composition data. (IP) |
| 1.05 | As 1.04 but with sample sizes for composition data and CVs of index data based on expert judgement. |
if(!'devtools' %in% installed.packages()) install.packages('devtools')
devtools::install_github("SPRFMO/jjmR")
if(!'kableExtra' %in% installed.packages()) install.packages('kableExtra')
You’ll need to be in the jjm/assessment directory in
order for the code here to run.
library(jjmR)
library(tidyverse)
library(kableExtra)
pwd <- getwd()
# if (!grepl(basename(pwd), "assessment", ignore.case = TRUE)) {
# stop(paste("Set working directory to jjm/assessment"))
# }
geth <- function(mod,h=hyp) paste0(h,"_", mod)
fn.plotind <- function(mods2compare, indname) {
fn.seldata <- function(x) {
x$data$Index[,i] %>%
bind_rows() %>%
pivot_longer(everything(), names_to="year") %>%
drop_na() %>%
mutate(year=as.numeric(year),
assessment_year=max(year))
}
mods <- compareModels(geth(mods2compare, "h2"))
i <- grep(indname,mods[[1]]$data$Inames)
dat2use <- list()
for(m in 1:length(mods)) {
dat2use[[m]] <- fn.seldata(mods[[m]])
}
p <- map_dfr(dat2use, ~as_tibble(.)) %>%
mutate(assessment_year=as.factor(assessment_year)) %>%
ggplot(aes(x=year,y=value,colour=assessment_year)) +
geom_line() +
theme_minimal() +
scale_x_continuous(breaks= scales::pretty_breaks())
print(p)
}
fixed_bmsy <- function(mod,refpt=5500){
old_rat <- (mod[[1]]$output[[1]]$msy_mt[,13])
new_rat <- (mod[[1]]$output[[1]]$msy_mt[,12]/ refpt)
mod[[1]]$output[[1]]$msy_mt[,13] <- new_rat
mod[[1]]$output[[1]]$msy_mt[,10] <- refpt
return(mod)
}
FinModName <- "1.05"
Plot comparing biomass estimated by last year’s model (h1_0.00) with data updated to 2021.
Plot comparing recruitment estimated by last year’s model (h1_0.00) with data updated to 2021.
Plot comparing fishing mortality estimated by last year’s model (h1_0.00) with data updated to 2021.
Plot comparing biomass estimated by last year’s model (h2_0.00) with data updated to 2021.
Plot comparing recruitment estimated by last year’s model (h2_0.00) with data updated to 2021.
Plot comparing fishing mortality estimated by last year’s model (h2_0.00) with data updated to 2021.
Plot comparing biomass estimated by last year’s model (h1_0.03) with data updated to 2021.
Plot comparing recruitment estimated by last year’s model (h1_0.03) with data updated to 2021.
Plot comparing fishing mortality estimated by last year’s model (h1_0.03) with data updated to 2021.
Plot comparing biomass estimated by last year’s model (h2_0.03) with data updated to 2021.
Plot comparing recruitment estimated by last year’s model (h2_0.03) with data updated to 2021.
Plot comparing fishing mortality estimated by last year’s model (h2_0.03) with data updated to 2021.