Report template

Author

Yi-Jay Chang and Riyar Chiang

Code
library(r4ss)
library(dplyr)
library(stringr)
library(magrittr)
library(ggplot2)

main_dir <- this.path::this.proj()

report <- SS_output(dir = file.path(main_dir, "stock-synthesis-models", params$model_dir), verbose=FALSE, printstats=FALSE)

new_steep <- report$parameters %>%
             filter(str_detect(Label, "SR_BH_steep")) %>% ## Need to change this to match the parameter name in control file
             pull(Value)

Model modification description

I changed the steepness to 0.7.

Plot of SSB

In fisheries science, SSB stands for Spawning Stock Biomass, which is a critical measure in stock assessment. SSB represents the total weight of all mature fish in a population capable of reproducing. It is an essential metric used to evaluate the health and sustainability of a fishery stock. By tracking SSB over time, scientists can assess the stock’s reproductive potential and determine if management measures are needed to ensure its long-term viability.

Code
ssb_summary <- report$timeseries %>%
               select(Yr, SpawnBio) %>%
               mutate(model_name = params$model_dir)

ssb_summary %>%
    ggplot() +
    geom_line(aes(x = Yr, y = SpawnBio)) +
    xlab("Year") +
    ylab("Spawning Biomass") +
    theme(panel.background = element_rect(fill = "white", color = "black", linetype = "solid"),
                panel.grid.major = element_line(color = 'gray70',linetype = "dotted"),
                panel.grid.minor = element_line(color = 'gray70',linetype = "dotted"),
                strip.background =element_rect(fill="white"),
                legend.key = element_rect(fill = "white"))

Plot of recruitment

Recruitment in stock assessment refers to the process by which young fish (juveniles) enter the population and become part of the fishery. Typically, recruitment is measured as the number of fish that reach a specific life stage, such as the size or age at which they are first caught by fishing gear or become part of the spawning population.

Code
Recruit_summary <- report$recruit %>%
               select(Yr, dev) %>%
               mutate(model_name = params$model_dir)

Recruit_summary %>%
    ggplot() +
    geom_line(aes(x = Yr, y = dev)) +
    xlab("Year") +
    ylab("dev") +
    theme(panel.background = element_rect(fill = "white", color = "black", linetype = "solid"),
                panel.grid.major = element_line(color = 'gray70',linetype = "dotted"),
                panel.grid.minor = element_line(color = 'gray70',linetype = "dotted"),
                strip.background =element_rect(fill="white"),
                legend.key = element_rect(fill = "white"))

Back to top