Forums

Back

Inputting deviation vector for MG parameters in control file

PK
Peter Kuriyama, modified 4 Years ago.

Inputting deviation vector for MG parameters in control file

Youngling Posts: 2 Join Date: 3/15/18 Recent Posts

Hi SS team, 

 

What is the format for inputting a deviation vector for time-varying MG parameters (e.g. cohort growth) in the control file? The manual says to input them after the TG parameters but I think SS is reading them as variance adjustment parameters. 

Say I've estimated cohort growth deviations in a model, and the control.ss_new file has commented descriptions of the deviation vectors. 

From control.ss_new

0   #  use 2D_AR1 selectivity(0/1)
#_no 2D_AR1 selex offset used
#
# Tag loss and Tag reporting parameters go next
0  # TG_custom:  0=no read and autogen if tag data exist; 1=read
#_Cond -6 6 1 1 2 0.01 -4 0 0 0 0 0 0 0  #_placeholder if no parameters
#
# deviation vectors for timevary parameters
#  base   base first block   block  env  env   dev   dev   dev   dev   dev
#  type  index  parm trend pattern link  var  vectr link _mnyr  mxyr phase  dev_vector
#      1     3     1     0     0     0     0     1     1  1982  2019     4 -4.74739 -2.67466 -0.140121 0.472827 0.0923778 -2.56083 -1.85329 1.09853 -4.85296 1.68831 -0.603715 0.0574974 -1.2095 4.93564 -0.830913 0.15358 -0.363772 -1.36393 1.95603 -2.23447 4.07689 -4.96396 1.66844 0.929938 9.78155 4.38053 3.69499 -4.44708 8.47207 -1.20438 -3.44645 -4.31041 1.96447 -1.19382 0.147736 -2.70018 2.98459 3.20983
#      1    13     3     0     0     0     0     2     1  1982  2019     5 1.1639 -2.49719 1.95786 -2.18513 -0.252127 1.65013 -2.24579 -1.24304 -0.513772 0.0190251 -0.334822 0.969157 -1.57207 1.95141 -2.44934 2.88252 0.371885 0.574171 -0.637478 1.05763 0.789094 2.9881 -0.50236 3.67068 0.0724201 2.11733 0.241812 0.58569 -0.121206 -1.3105 1.72859 -0.0154649 -0.103282 -0.268945 -2.25246 -0.236905 1.78808 0.278959

 

I've tried a couple things, one of which was to try to uncomment the deviation vector lines above. I think SS is reading the lines I've tried to input as variance adjustment values (see below). 

 

From echoinput.sso:

0 TG_custom (need to read even if no tag data ); tag_data?: 0 N_Fleet: 3
 dev vector #:  1 setup:  1 3 1 0 0 0 0 1 1 1982 2019 4 3 0 phase: 4
 dev vector #:  2 setup:  1 13 3 0 0 0 0 2 1 1982 2019 5 13 0 phase: 5
 read var_adjust list until -9999
 1 1 3
 1 0 0
 0 0 1
 1 1982 2019
 4 1.11173 0.0944435
 0.135578 0.389412 0.226817
 0.856733 0.103363 -0.359691
 -1.48202 -0.278921 -0.366551
 -0.570168 -0.22367 -1.25303
 -0.931673 -0.157324 -1.99008
 -0.269609 1.938 3.52326
 3.08203 1.39447 2.41065
 -0.7346 0.145877 -1.96864
 -3.76639 -3.69407 -1.6164
 0.0672479 -0.755547 -0.18352
 0.556263 0.274177 0.996706
 2.06624 0.492732 0.173065
 -9999 1 0
 number of variance adjustment records = 17

 

Thanks in advance for any suggestions

Peter Kuriyama

KD
Kathryn Doering, modified 4 Years ago.

RE: Inputting deviation vector for MG parameters in control file

Youngling Posts: 57 Join Date: 2/19/19 Recent Posts

Hi Peter,

 

Thanks for the question! If your goal is to put in a vector of  fixed parameter deviations, there isn't a way to do this in the control file to my knowledge.  You can only have SS estimate deviations by setting up the parameters related to the parameter deviations in the desired manner in the control file. 

 

However, the hack that I think would work would be to 1) run SS with all parameter values related to the devs not estimated (I think devs will stay at their starting values if this is the case), 2) input the parameter deviations into the ss.par file, 3)change the starter file to read from the par file, then 4) run SS again and see if this worked by seeing if the devs stayed the same or not. (Hopefully a more experience user will correct me if I missed a step here!)

 

Also, there may be some sort of alternative growth setup that accomplishes what you want to do, although I'm not sure...

 

Thanks,

Kathryn

 

 

IT
Ian Taylor, modified 4 Years ago.

RE: Inputting deviation vector for MG parameters in control file

Youngling Posts: 117 Join Date: 12/8/14 Recent Posts

I think Kathryn is right that there's no option for parameter devs (other than recdevs which are special in other ways too) to be input in the control file.

The .par file approach she proposes should work.

The other option that I can think of would be to define a block pattern with 1-year blocks spanning the 1982 to 2019 period you're looking at. That would then require new parameter lines for each period of the block, but you should be able to get identical results to the use of the devs (as long as the block functional form was chosen to match whatever you were using for the devs). This approach is clunkier but I think should give you all the control you would want, including the option for the parameters to replace the base parameter, rather than add to it or multiply by it.

IS
Ian Stewart, modified 4 Years ago.

RE: Inputting deviation vector for MG parameters in control file

Youngling Posts: 6 Join Date: 3/2/16 Recent Posts

I use the approach Ian describes above, and can verify that it produces identical results to the deviation approach, with the added benefit that you can have 'holes' in the vector where you turn off uninformed deviations if there are no data for that year.

Richard Methot, modified 4 Years ago.

RE: Inputting deviation vector for MG parameters in control file

Youngling Posts: 222 Join Date: 11/24/14 Recent Posts

One difference between the two approaches is that the deviation vector approach has the devs penalized by the dev se and there is option to use a rho also.  For the block approach, the dev se would have to be used as a prior on each of the block parameters.

PK
Peter Kuriyama, modified 4 Years ago.

RE: Inputting deviation vector for MG parameters in control file

Youngling Posts: 2 Join Date: 3/15/18 Recent Posts
Thanks everyone for the thorough responses!

Peter

On Thu, Mar 25, 2021 at 8:56 AM Richard Methot <VLab.Notifications@noaa.gov> wrote:

One difference between the two approaches is that the deviation vector approach has the devs penalized by the dev se and there is option to use a rho also.  For the block approach, the dev se would have to be used as a prior on each of the block parameters.


--
Richard Methot Stock Synthesis Virtual Lab Forum https://vlab.noaa.gov/web/stock-synthesis/public-forums/-/message_boards/view_message/14224700 VLab.Notifications@noaa.gov