Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock...

41
Introduction to Stock Synthesis

Transcript of Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock...

Page 1: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Introduction to Stock Synthesis

Page 2: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Outline

• Websites

• Why we need a general model

• AD Model Builder

• Stock Synthesis Specifications

• Using Stock Synthesis

Page 3: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Websites

• AD Model Builder information– http://admb-foundation.org/

• Stock Synthesis II/III information– http://nft.nefsc.noaa.gov/SS2.html

• Stock assessment course– http://iattc.org/iattc-staffMMaunderCourses-ta

ught.htm

• All can be accessed from here– http://www.fisheriesstockassessment.com/

Page 4: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Why we need a new general model

• Too many populations to assesses

• Not enough qualified analysts

• Common language

• Current models are reaching their limitations

• Fit to data

Page 5: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Common language

• Facilitates discussions

• Easier to review– use of SS2 in west coast STAR panel process

and Pacific cod assessment

• Comprehensive analysis and testing to develop best practices

• Focuses development

• Reduces duplication

Page 6: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Advantages of a general model

• Less development time

• Tested code

• Familiarity

• Diagnostics and output

Page 7: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

AD Model Builder

• Tool for developing nonlinear models

• Efficient estimation of model parameters

• C++ libraries

• Template

Page 8: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Simplifying the development of models

• Removes the need to manage the interface between the model parameters and function minimizer.

• The template makes it easy to input and output data from the model, set up the parameters to estimate, and set up objective function to optimize (minimize).

• adding additional estimable parameters or converting fixed parameters into estimable parameters is a simple process.

• ADMB is also very flexible as model code is in C++• Experienced C++ programmers to create their own

libraries

Page 9: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Efficient and stable function minimizer

• Analytical derivatives– Adjoint code– Chain rule

• More efficient and stable than other packages that use finite difference approximation.

• Stepwise process to sequentially estimate the parameters

• Bounds on all estimated parameters that restrict the range of possible parameter values.

Page 10: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Other features

• MCMC for Bayesian integration

• Automated profile likelihoods

• Random effects

Page 11: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

What its good for: Highly parameterize nonlinear models

• Large data sets– Hundreds of thousands of data points

• Complex models– Thousands of parameters

• Numerous optimizations of the objective function • Combining many data sets or analyses• General Models

Page 12: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Stock Synthesis

Richard D. Methot

NOAA Fisheries

Seattle, WA

Page 13: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

What is SS2/SS3

• A general statistical age-structured model programmed in AD Model Builder

• Includes many types of data

• Includes prior information

• MLE or Bayesian context

• Calculates uncertainty

• Performs forward projections and MSY calculations

Page 14: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Main specifications

• One or two sexes

• One or more areas (movement and tagging data in SS3)

• One or more seasons per year

• Growth morphs

• Environmental covariates for parameters

• Popes approximation or Baranov catch equation

Page 15: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Initial conditions: (see spread sheet)

0

20

40

60

80

100

120

0 2 4 6 8 10 12 14 16 18 20

Age

Ab

un

da

nce

Virgin Initial Initai with dev

Page 16: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Initial conditions: two approaches

• Fit to initial catch– Set initial equal to the catch in the first few years or to

a guess of the catch in the years preceding the start of the model

• Reduce parameters– Rather than use one parameter for each age– Don’t fit to initial catch– Use one fishery that catches small fish and one that

catches large fish

• Often the two approaches give the same results after the first few years

Page 17: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Recruitment

yRyy VhfR exp5.0exp 2

Environmental index: h’ is environmental index linkage parameterVy is value of environmental index

S-R relationship: Beverton-HoltRicker

Page 18: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Dynamics

• Seasons, proportion natural mortality by length of season

• Length based and age based selectivities

• Retention curves to model discards

Page 19: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Natural mortality (has been modified to include more options)

Page 20: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Growth(has been modified to include more options)

• Von Bertalanffy

• Variation of length-at-age is normally distributed

Page 21: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Selectivity

• Many different functional forms

• Some non/semi parametric

• Double normal most commonly used– See excel spread sheet

Page 22: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Data types

• Abundance index• Catch-at-length• Catch-at-age

– Aging error

• Mean length-at-age• Mean body weight• Discards• Now tagging

Page 23: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Index of abundance

2,,

1,, 5.0exp ftftQftfft

fBQG

2,, ,0~ ftft N

t ft

obsftftobs

f

GGGL

2,

2

,,

2

lnln|ln

Allows for a nonlinear (power) relationshipLog-normal likelihoodCan’t estimate standard deviation

Page 24: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Composition data (C@L and C@A)

• Uses the multinomial distribution

• Can be compressed at the tails

• Can include aging error

• Can be one sex, combined sex, or both sexes

Page 25: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Priors – normal (or beta see page 34)

2

2

2

p

Page 26: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Using SS2

Page 27: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Main files• Starter file (starter.ss)

– Names of data and control files– Options for running the model

• Data file (user defined name)– Dimensions (years, ages, fisheries, areas, seasons,

…)– Data (catch, discards, indices, C@A, C@L,

environmental indices, ….)• Control file (user defined name)

– Parameter definitions– Likelihood control

• Forecast file (forecast.ss)– Forecast definitions (years, harvest rates, MSY

calculations, …)

Page 28: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

User interface

• See website

Page 29: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Results Excel workbook(R code also available, what is available for SS3)

• Provides results

• Graphs

• Diagnostics

• Management quantities and Projections

Page 30: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

• 14 values for parameter estimation control

• Smaller parameter definitions

• Exponential offsets

• Parameter modifications– Temporal deviates– Environmental variables– Time blocks

• Growth morphs

Page 31: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Parameter estimation controls

• Determines – Which parameters are estimated– Bounds and priors– Temporal variation– Covariates

Page 32: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.
Page 33: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.
Page 34: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Exponential offsets

• Many of the parameters are based on exponential offsets from other parameters

• P = Base*exp(offset)

• if offset = 0 they are the same

• P can’t go negative (assuming Base is not negative)

Page 35: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Temporal deviates

• Like annual recruitment deviates

• Log-normal with penalty applied

Page 36: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Environmental variables

• Pt = base*exp(β*Xt)

Page 37: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Time blocks

• Sets groups of years that have the same values for a parameter

• The ways of defining it– 0: base * exp(blockparm)– 1: base + blockparm– 2: blockparm

Page 38: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Show EPO BET files

Page 39: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Initial conditions: data file

42500 0 0 0 0 0 0 0 0#_init_equil_catch_for_each_fishery

Page 40: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Initial conditions: Control file

#_Spawner-Recruitment…-99 99 0.65 0 0 0 -1 # SR_sigmaR… -5 5 -1.41416 0 -1 0 1 # SR_R1_offset…1977 # first year of main recr_devs; early devs can preceed this era…#_initial_F_parms#_LO HI INIT PRIOR PR_type SD PHASE 0 2 0.138176 0 -1 0 1 # InitF_1_Jan-May_Trawl_Fishery_…1 #_init_equ_catch lambda

Note new controls in SS3

(more options)

Note new controls in SS3

(turn on/off defaults)

Page 41: Introduction to Stock Synthesis. Outline Websites Why we need a general model AD Model Builder Stock Synthesis Specifications Using Stock Synthesis.

Recruitment controls(see advanced options in SS3)

• #_Spawner-Recruitment• 1 #_SR_function• #_LO HI INIT PRIOR PR_type SD PHASE• 12 16 13.245 0 -1 0 1 # SR_R0• -99 99 1 0 0 0 -1 # SR_steep• -99 99 0.65 0 0 0 -1 # SR_sigmaR• -99 99 0 0 0 0 -1 # SR_envlink• -5 5 -1.41416 0 -1 0 1 # SR_R1_offset• -99 99 0 0 0 0 -1 # SR_autocorr• 1 #_SR_env_link• 2 #_SR_env_target_0=none;1=devs;_2=R0;_3=steepness

• 1 #do_recdev: 0=none; 1=devvector; 2=simple deviations• 1977 # first year of main recr_devs; early devs can preceed this era• 2006 # last year of main recr_devs; forecast devs start in following year• 2 #_recdev phase