Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
e-perl-NOAA committed Jan 9, 2025
1 parent fd81f67 commit 6c8dddf
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 37 deletions.
2 changes: 1 addition & 1 deletion 13output.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
\subsection[Main Output File, \texttt{Report.sso}]{\protect\hyperlink{MainOutput}{Main Output File, \texttt{Report.sso}}}
This is the primary output file. The file starts with KeyWords\_of\_tables\_available\_in\_report\_sso which is a list of tables organized by category indicating which tables are included in the Report file. The full list of tables (as of v.3.30.23) is listed below.

\begin{longtable}{p{1.5cm} p{5.5cm} >{\RaggedRight\arraybackslash}p{4.25cm} p{9.75cm}}
\begin{longtable}{p{1.5cm} p{5.5cm} >{\raggedright\arraybackslash}p{4.25cm} p{9.75cm}}
\hline
\multirow{1}{1cm}[-0.25cm]{\parbox{1.5cm}{\textbf{Report Number}}} & \textbf{Report file notation} & \textbf{r4ss notation} & \textbf{Notes} \\
\textbf{} & \textbf{\textit{Description (if needed)}} & \textbf{} & \textbf{} \Bstrut\\
Expand Down
10 changes: 7 additions & 3 deletions 15special.tex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

Environmental and density dependent linkages, parameter deviations, and either time blocks or trends can be applied to the same base parameter. The model processes each time-varying parameter specification (first time blocks and trends, then environmental linkages, then parameter deviations) and creates a time series of intermediate values that are used as the model subsequently loops through years.

% figure 2
\begin{figure}[ht]
\begin{center}
\includegraphics[alt={Some examples of time-varying setups.},scale = 0.4]{TimeVarying}\\
Expand Down Expand Up @@ -159,12 +160,13 @@
\item Calculate a new parameter value, $P_{JITTERED}$, such that $pr(P_{JITTERED}) = J$.
\end{enumerate}

% figure 3
\begin{figure}[ht]
\begin{center}
\includegraphics[alt={Plot showing parameter space on the x-axis along and transformed space on the y-axis. A cumulative normal line is shown where the 0.001 and 0.999 quantiles are set to min and max respectively. A vertical stack of horizontal bars show the distribution of transformed initial values plus U. The distribution is shown on the parameter space axis with the initial input value in gray and the new init in red. Red arrows on the cumulative normal line show the random U written as negative jitter value comma positive jitter value.},scale = 0.75]{jitter_illustration}\\
\caption{Illustration of the jitter algorithm.}
\label{fig:jitter}
\end{center}
\caption{Illustration of the jitter algorithm.}
\label{fig:jitter}
\end{figure}

In SS3, the jitter fraction defines a uniform distribution in cumulative normal space +/- the jitter fraction from the initial value (in cumulative normal space). The normal distribution for each parameter, for this purpose, is defined such that the minimum bound is at 0.001, and the maximum at 0.999 of the cumulative distribution. If the jitter faction and original initial value are such that a portion of the uniform distribution goes beyond 0.001 or 0.999 of the cumulative normal, the new value is set to one-tenth of the way from the bound to the original initial value.
Expand Down Expand Up @@ -212,12 +214,14 @@
& P_\text{PRSD} \cdot ln\left(1-\frac{P_\text{init}-P_\text{LB}-0.0001}{P_\text{UB}-P_\text{LB}}\right)
\end{split}
\end{equation}


% figure 4
\begin{figure}[ht]
\begin{center}
\includegraphics[alt={The shape of the symmetric beta prior across alternative standard deviation values and the change in the negative log likelihood.},scale = 0.6]{SymetricBeta}\\
\end{center}
\caption{The shape of the symmetric beta prior across alternative standard deviation values and the change in the negative log likelihood.}
\label{fig:symmetricbeta}
\end{figure}


Expand Down
2 changes: 1 addition & 1 deletion 6starter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SS3 begins by reading the file \texttt{starter.ss}. The starter file contains need information on the names of the control and data files, run conditions, and output specifications. The term COND appears in the ``Typical Value'' column of this documentation (it does not actually appear in the model files), it indicates that the following section is omitted except under certain conditions, or that the factors included in the following section depend upon certain conditions. In most cases, the description in the definition column is the same as the label output to the ss\_new files.

\hypertarget{FTerminology}{}
\subsection[Terminology for Fishing Mortality, $F$]{\protect\hyperlink{FTerminology}{Terminology for Fishing Mortality, $F$}}
\subsection[Terminology for Fishing Mortality, \texorpdfstring{$F$}{F}]{\protect\hyperlink{FTerminology}{Terminology for Fishing Mortality, \texorpdfstring{$F$}{F}}}
Here we introduce some terminology related to fishing mortality, $F$. This will provide context for some of the quantities that will be read from the starter file and used throughout the document

$f$ is fleet.
Expand Down
5 changes: 2 additions & 3 deletions 8data.tex
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
The term COND appears in the ``Typical Value'' column of this documentation (it does not actually appear in the model files), it indicates that the following section is omitted except under certain conditions, or that the factors included in the following section depend upon certain conditions. In most cases, the description in the definition column is the same as the label output to the ss\_new files.

\hypertarget{ModelDimensions}{}
\subsection[Model Dimensions]{\protect\hypertarget{ModelDimensions}{Model Dimensions}}
\subsection[Model Dimensions]{\protect\hyperlink{ModelDimensions}{Model Dimensions}}
\begin{center}
\begin{longtable}{p{3cm} p{12cm}}
\hline
Expand Down Expand Up @@ -229,7 +229,6 @@
\end{itemize}
See \hyperlink{UnitsOfMeasure}{Units of Measure} for more information.

\hypertarget{CatchMult}{}
\myparagraph{Catch Multiplier}
Invokes use of a catch multiplier, which is then entered as a parameter in the mortality-growth parameter section. The estimated value or fixed value of the catch multiplier is used to adjust the observed catch:
\begin{itemize}
Expand Down Expand Up @@ -343,7 +342,7 @@

With the input of data on the time series of total kill or predator effort, it should be possible to estimate annual deviations around the base $M2$ for years with data. If the $M2$ time series is instead driven by environmental data, then also including data on kill or effort can provide a means to view consistency between the environmental time series and the additional data sets. Output of $M2$ is found in a \texttt{Report.sso} section labeled predator ($M2$). In the example below, the $M2$ seasonal multiplier was defined to have random deviations by year. This allowed multipliers plus $M2$ itself to closely match the input consumption amounts (288 mt of consumption per season, the fit can be examined by looking at the discard output report).

\hyperlink{Catch}{}
\hypertarget{Catch}{}
\subsection[Catch]{\protect\hyperlink{Catch}{Catch}}
\hypertarget{CatchFormat}{}
After reading the fleet-specific indicators, a list of catch values by fleet and season are read in by the model. The format for the catches is year and season that the catch is attributed to, fleet, a catch value, and a year-specific catch standard error. Only positive catches need to be entered, so there is no need for records corresponding to all years and fleets. To include an equilibrium catch value for a fleet and season, the year should be noted as -999. For each non-zero equilibrium catch value included, a short parameter line is required in the \hyperlink{InitF}{initial $F$ section} of the control file.
Expand Down
4 changes: 2 additions & 2 deletions 9control.tex
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ \subsubsection{Predator Fleet Mortality}
& Catch Multiplier & For each fleet selected for this option in the data file. \\
\hline

\multicolumn{2}{l}{Fraction female}\Tstrut & \raisebox{0.1\ht\strutbox}{\hypertarget{SexRatio}{Fraction}} female at the time of recruitment by growth pattern, if multiple growth patterns, multiple entries required. \Bstrut\\
\multicolumn{2}{l}{Fraction female}\Tstrut & \raisebox{0.1\ht\strutbox}{\hyperlink{SexRatio}{Fraction}} female at the time of recruitment by growth pattern, if multiple growth patterns, multiple entries required. \Bstrut\\
\hline

\multicolumn{3}{l}{COND: The following lines are only required when predator fleets are invoked.} \Tstrut\\
Expand Down Expand Up @@ -1205,7 +1205,7 @@ \subsubsection{Predator Fleet Mortality}
The $R_{0}$, steepness, and regime shift parameters can be time-varying by blocks, trends, environmental linkages, or random deviations. Details on how to specify time-varying parameters can be found in the \hyperlink{tvOrder}{Time-Varying Parameter Specification and Setup} section. However, not all of these options make sense for all parameters; please see additional details in the section on \hyperlink{tv-sr}{Time-Varying Stock-Recruitment Considerations}.

\hypertarget{TuneSigmaR}{}
\subsubsection[Tuning $\sigma_R$]{\protect\hyperlink{TuneSigmaR}{Tuning $\sigma_R$}}
\subsubsection[Tuning \texorpdfstring{$\sigma_R$}{Sigma R}]{\protect\hyperlink{TuneSigmaR}{Tuning \texorpdfstring{$\sigma_R$}{Sigma R}}}
The $\sigma_R$ value is typically not estimable and it is recommended practice to tune input $\sigma_R$ values based on the variance in estimated recruitments post running SS3. The R package \href{https://github.com/r4ss/r4ss}{R code for Stock Synthesis (\texttt{r4ss})} designed to read and visualize SS3 model results provides recommendations on adjusting $\sigma_R$ values in the \texttt{sigma\_R\_info} object in the list created by the \texttt{r4ss::SS\_output()} function. An alternative $\sigma_R$ value is provided based on equation:

\begin{equation}
Expand Down
3 changes: 3 additions & 0 deletions SS330_User_Manual-luamml-mathml.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!DOCTYPE html>
<html>

43 changes: 19 additions & 24 deletions SS330_User_Manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,38 @@
\documentclass[12pt]{article}
\usepackage{sectsty} % Allows for different fonts for header and body
\usepackage{natbib}
\usepackage{lipsum, multicol}
\usepackage{multicol}
\usepackage[margin=1in, includefoot]{geometry}
\usepackage{graphicx} %allows for impage import
\usepackage{graphicx} % allows for image import
\graphicspath{{images/}}
%\usepackage[hidelinks]{hyper ref} % Allows for clickable links
\usepackage{hyper ref}
\usepackage{ragged2e}
% \usepackage{ragged2e}
\usepackage{enumerate}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[none]{hyphenat}
\usepackage{array}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage[utf8]{inputenc}
%\usepackage[english]{babel}
% \usepackage[utf8]{inputenc}
% \usepackage[english]{babel}
\usepackage[table]{xcolor}
\usepackage{colortbl}
\usepackage{hhline}
\usepackage{dcolumn}
\usepackage{tocloft}
\setlength{\cftsubsecnumwidth}{3em}
\setlength{\cftsubsubsecnumwidth}{4em}
% \usepackage{tocloft}
% \setlength{\cftsubsecnumwidth}{3em}
% \setlength{\cftsubsubsecnumwidth}{4em}
\usepackage{hyperref}
\usepackage{hypcap}
\usepackage{amsmath}
\usepackage{hyperref}
%\usepackage[pdfborderstyle={/S/U/W 1}]{hyperref}
\usepackage{unicode-math}
\setmathfont{latinmodern-math.otf}
\usepackage{float}
\usepackage{fancyhdr}
\usepackage[parfill]{parskip}
\usepackage{roboto} % sans serif font for headers
\usepackage{crimson} % serif font
\usepackage[T1]{fontenc} % controls font enconding
\usepackage[T1]{fontenc} % controls font encoding
\usepackage[nottoc,numbib]{tocbibind}
\usepackage[all]{nowidow} % Widow Control

Expand All @@ -66,18 +62,14 @@

%sectsty commands
% all section headers use the same sans serif family - roboto
%\allsectionsfont{\sffamily\selectfont\roboto\mdseries\bfseries}
\allsectionsfont{\sffamily\selectfont\roboto\mdseries\bfseries}
% Set size and color of section header AL's H1
%\sectionfont{\LARGE\nohang\centering\roboto\textcolor[cmyk]{0.90, 0.54, 0.28, 0.12}}
\sectionfont{\LARGE\nohang\centering\roboto\textcolor[cmyk]{0.90, 0.54, 0.28, 0.12}}
% Set size and color of subsection header AL's H2
%\subsectionfont{\fontsize{18pt}{20pt}\selectfont\roboto\nohang\centering\textcolor[cmyk]{0.90, 0.54, 0.28, 0.12}}
\subsectionfont{\fontsize{18pt}{20pt}\selectfont\roboto\nohang\centering\textcolor[cmyk]{0.90, 0.54, 0.28, 0.12}}
% Set size and color of subsubsection header AL's H3
\subsubsectionfont{\hspace{0pt}\nohang\fontsize{16pt}{18pt}\selectfont\roboto\raggedright\textcolor[cmyk]{0.50, 0.05, 0.0, 0.40}}
% Set size and color of paragraph header AL's H4
%\paragraphfont{\fontsize{14pt}{16pt}\selectfont\robotocondensed\fontseries{bl}\selectfont\textcolor[cmyk]{0.50, 0.05, 0.0, 0.40}}
\paragraphfont{\fontsize{14pt}{16pt}\selectfont\robotocondensed\fontseries{bl}\selectfont\textcolor[cmyk]{0.50, 0.05, 0.0, 0.40}}
\newcolumntype{R}{>{\raggedright\arraybackslash}p{3cm}}

Expand Down Expand Up @@ -105,7 +97,7 @@

%%The following sets up how the pdf displays links and functions in Acrobat.
\hypersetup{
bookmarks = true, % show bookmarks bar?
% bookmarks = true, % show bookmarks bar?
unicode = false, % non-Latin characters in Acrobat's bookmarks
pdftoolbar = true, % show Acrobat's toolbar?
pdfmenubar = true, % show Acrobat's menu?
Expand Down Expand Up @@ -160,12 +152,14 @@

\begin{document}
% ====== Title Page ===================================================
\hypersetup{pageanchor=false}
\maketitle
% figure 1
\begin{figure}[ht]
\begin{center}
\includegraphics[alt={Logo of the National Oceanic and Atmospheric Administration (NOAA)},height=2in]{noaalogo.jpg}
\end{center}
%\caption{Logo of the National Oceanic and Atmospheric Administration (NOAA)}
% \caption{Logo of the National Oceanic and Atmospheric Administration (NOAA)}
\label{fig:logo}
\end{figure}

Expand All @@ -174,11 +168,11 @@
\normalfont % this sets the main font to crimson
\normalsize %% return the text to 12 point font - otherwise you end up with 22 point font!
% Set base font as serif
%\fontfamily{crimson}\selectfont


% ====== Table of Contents ===================================================
\glsaddall
\glsaddall
\hypersetup{pageanchor=true}
\pagenumbering{roman}
\tableofcontents
\thispagestyle{empty}
Expand Down Expand Up @@ -217,6 +211,7 @@
\input{14r4ss}
%========= Section 15: Special Set-ups
\input{15special}

%========= Section 16: Essays
\input{16essays}
%========= Glossary
Expand Down
3 changes: 2 additions & 1 deletion _data_weighting.tex
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

If the tuning has been implemented, the green lines in the figure below would approximately intersect at a point which is on the black 1-to-1 diagonal line in this figure created by the \texttt{r4ss} function \texttt{SS\_plots()}.

% figure 5
\begin{figure}[ht]
\begin{center}
\includegraphics[alt={A plot produced from SS\_plots() in r4ss showing the results from the implementation of the McAllister-Ianelli data-weighting method to the model output using the SS\_tune\_comps() function. The observed sample size is on the x-axis and the effective sample size is on the y-axis with a horizontal green dashed line indicating the harmonic mean and a vertical green dashed line indicating the arithmetic mean.},scale = 0.65]{appendixB_McAllister_Ianelli}\\
Expand All @@ -55,13 +56,13 @@

The figure below shows the estimated 95\% intervals around the observed mean length by year based on the input sample size (thick lines) and the increase in that uncertainty which would occur if the sample sizes were adjusted according to the proposed multiplier.

% figure 6
\begin{figure}[ht]
\begin{center}
\includegraphics[alt={A plot produced from SS\_plots() in r4ss showing the results from the implementation of the Francis data-weighting method to the output using the SS\_tune\_comps() function. Year is on the x-axis and mean length is on the y-axis. There are 95\% confidence interval boxes around the mean displayed for each year. A blue line shows the expected variation of mean length across years.},scale = 0.15]{appendixB_Francis}\\
\end{center}
\caption{The mean length of the length samples for each year from the MexCal S1 NSP fleet with 95\% confidence intervals based on current samples sizes using the Francis data weighting method (referred to as TA1.8). Thinner intervals with capped ends show result of further adjusting sample sizes based on the suggested multiplier, 0.2739, with 95\% intervals for length data from the fleet. The blue line shows the expected variation of the mean length across years.}
\label{fig:francis}
%\figurename{name}
\end{figure}

There are a several of challenges posed by the Francis data-weighting approach:
Expand Down
Loading

0 comments on commit 6c8dddf

Please sign in to comment.