diff --git a/articles/Jitter.html b/articles/Jitter.html index c0f86a3..2158186 100644 --- a/articles/Jitter.html +++ b/articles/Jitter.html @@ -136,7 +136,7 @@

Model inputsget_ss3_exe().

 r4ss::get_ss3_exe(dir = dir_jitter, version = "v3.30.21")
-#> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpQp3hSd/jitter/ss3
+#> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/Rtmpkuz5f4/jitter/ss3

We will run the model in dir_jitter first to produce the necessary output files. It is recommended to do jitter runs in a subdirectory of your model run. This will keep all of the output files @@ -153,7 +153,7 @@

Jitter arguments and it will run and produce the total likelihoods for each run.

-Njitter <- 5 
+Njitter <- 50 
 jit.likes <- r4ss::jitter(dir = dir_jitter, 
                           Njitter = Njitter, 
                           init_values_src = 1, 
@@ -177,41 +177,181 @@ 

Jitter head(jit_summary$likelihoods) #> replist replist1 replist2 replist3 replist4 replist5 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 +#> 2 1.33479e-10 1.33479e-10 1.33480e-10 1.33479e-10 1.33479e-10 1.33479e-10 +#> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 +#> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 +#> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 +#> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 +#> replist6 replist7 replist8 replist9 replist10 replist11 +#> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 +#> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 +#> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 +#> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 +#> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 +#> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 +#> replist12 replist13 replist14 replist15 replist16 replist17 +#> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 +#> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 +#> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74853e-01 1.74852e-01 1.74852e-01 +#> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 +#> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 +#> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 +#> replist18 replist19 replist20 replist21 replist22 replist23 +#> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 +#> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 +#> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 +#> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 +#> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 +#> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 +#> replist24 replist25 replist26 replist27 replist28 replist29 +#> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 +#> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 +#> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 +#> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 +#> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 +#> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 +#> replist30 replist31 replist32 replist33 replist34 replist35 +#> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 +#> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 +#> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 +#> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 +#> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 +#> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 +#> replist36 replist37 replist38 replist39 replist40 replist41 +#> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 +#> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 +#> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 +#> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 +#> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 +#> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 +#> replist42 replist43 replist44 replist45 replist46 replist47 +#> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 -#> Label -#> 1 TOTAL -#> 2 Catch -#> 3 Equil_catch -#> 4 Survey -#> 5 Length_comp -#> 6 Age_comp +#> replist48 replist49 replist50 Label +#> 1 7.54302e+02 7.54302e+02 7.54302e+02 TOTAL +#> 2 1.33479e-10 1.33479e-10 1.33479e-10 Catch +#> 3 1.74852e-01 1.74852e-01 1.74852e-01 Equil_catch +#> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 Survey +#> 5 3.66756e+02 3.66756e+02 3.66756e+02 Length_comp +#> 6 2.31845e+02 2.31845e+02 2.31845e+02 Age_comp head(jit_summary$quants) -#> replist replist1 replist2 replist3 replist4 replist5 Label Yr -#> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 SSB_Virgin NA -#> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 SSB_Initial NA -#> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 SSB_2011 2011 -#> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 SSB_2012 2012 -#> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 SSB_2013 2013 -#> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 SSB_2014 2014 +#> replist replist1 replist2 replist3 replist4 replist5 replist6 replist7 +#> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 +#> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 +#> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 +#> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 +#> replist8 replist9 replist10 replist11 replist12 replist13 replist14 replist15 +#> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 +#> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 +#> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 +#> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 +#> replist16 replist17 replist18 replist19 replist20 replist21 replist22 +#> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 +#> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 +#> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 +#> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 +#> replist23 replist24 replist25 replist26 replist27 replist28 replist29 +#> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 +#> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 +#> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 +#> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 +#> replist30 replist31 replist32 replist33 replist34 replist35 replist36 +#> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 +#> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 +#> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 +#> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 +#> replist37 replist38 replist39 replist40 replist41 replist42 replist43 +#> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 +#> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 +#> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 +#> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 +#> replist44 replist45 replist46 replist47 replist48 replist49 replist50 +#> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 +#> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 +#> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 +#> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 +#> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 +#> Label Yr +#> 1 SSB_Virgin NA +#> 2 SSB_Initial NA +#> 3 SSB_2011 2011 +#> 4 SSB_2012 2012 +#> 5 SSB_2013 2013 +#> 6 SSB_2014 2014 head(jit_summary$pars) -#> replist replist1 replist2 replist3 replist4 replist5 -#> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 -#> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 -#> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 -#> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 -#> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 -#> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 -#> Label Yr recdev -#> 1 NatM_uniform_Fem_GP_1 NA FALSE -#> 2 L_at_Amin_Fem_GP_1 NA FALSE -#> 3 L_at_Amax_Fem_GP_1 NA FALSE -#> 4 VonBert_K_Fem_GP_1 NA FALSE -#> 5 CV_young_Fem_GP_1 NA FALSE -#> 6 CV_old_Fem_GP_1 NA FALSE

+#> replist replist1 replist2 replist3 replist4 replist5 replist6 +#> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 +#> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 +#> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 +#> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> replist7 replist8 replist9 replist10 replist11 replist12 replist13 +#> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 +#> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 +#> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 +#> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> replist14 replist15 replist16 replist17 replist18 replist19 replist20 +#> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 +#> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 +#> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 +#> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> replist21 replist22 replist23 replist24 replist25 replist26 replist27 +#> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 +#> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 +#> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 +#> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> replist28 replist29 replist30 replist31 replist32 replist33 replist34 +#> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 +#> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 +#> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 +#> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> replist35 replist36 replist37 replist38 replist39 replist40 replist41 +#> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 +#> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 +#> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 +#> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> replist42 replist43 replist44 replist45 replist46 replist47 replist48 +#> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 +#> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 +#> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 +#> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 +#> replist49 replist50 Label Yr recdev +#> 1 0.100000 0.100000 NatM_uniform_Fem_GP_1 NA FALSE +#> 2 22.769000 22.769000 L_at_Amin_Fem_GP_1 NA FALSE +#> 3 71.807200 71.807200 L_at_Amax_Fem_GP_1 NA FALSE +#> 4 0.142165 0.142165 VonBert_K_Fem_GP_1 NA FALSE +#> 5 0.100000 0.100000 CV_young_Fem_GP_1 NA FALSE +#> 6 0.100000 0.100000 CV_old_Fem_GP_1 NA FALSE

You may also want to check that the models converged. To do this you can check the maximum gradients to make sure they are all small (< 0.0001). You can also compare the estimated spawning biomass, if they diff --git a/articles/Jitter_files/figure-html/unnamed-chunk-9-1.png b/articles/Jitter_files/figure-html/unnamed-chunk-9-1.png index 3688cd6..b527ae7 100644 Binary files a/articles/Jitter_files/figure-html/unnamed-chunk-9-1.png and b/articles/Jitter_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/Retrospective-Analysis.html b/articles/Retrospective-Analysis.html index 3219ca3..f50fd38 100644 --- a/articles/Retrospective-Analysis.html +++ b/articles/Retrospective-Analysis.html @@ -133,7 +133,7 @@

Model inputsget_ss3_exe().

 r4ss::get_ss3_exe(dir = dir_retro, version = "v3.30.21")
-#> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpdTAcjt/retrospectives/ss3
+#> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpAaZIvr/retrospectives/ss3

Retrospective Analysis diff --git a/articles/aspm.html b/articles/aspm.html index dd4fd77..de94f85 100644 --- a/articles/aspm.html +++ b/articles/aspm.html @@ -133,7 +133,7 @@

Model inputsget_ss3_exe().

 r4ss::get_ss3_exe(dir = dir_tmp, version = "v3.30.21")
-
## The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpW6yFM8/ss3
+
## The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/Rtmpal5pLE/ss3

ASPM diff --git a/articles/likelihood.html b/articles/likelihood.html index cae8c80..f4821cb 100644 --- a/articles/likelihood.html +++ b/articles/likelihood.html @@ -133,7 +133,7 @@

Model inputsget_ss3_exe().

 r4ss::get_ss3_exe(dir = dir_tmp, version = "v3.30.21")
-#> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpKDJxuj/ss3
+#> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpXsJ4IS/ss3

R0 Profile @@ -200,12 +200,7 @@

R0 Profile= "SR_LN", profilevec = r0_vec, exe = "ss3", - verbose = TRUE) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Doing runs: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -#> out of n = 11 -#> Changing working directory to /tmp/RtmpKDJxuj/profile, -#> but will be changed back on exit from function. + verbose = FALSE) #> running profile i=1/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -215,10 +210,6 @@

R0 Profile#> 1 8.9274 7.9274 1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=2/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -228,10 +219,6 @@

R0 Profile#> 1 7.9274 8.1274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=3/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -241,10 +228,6 @@

R0 Profile#> 1 8.1274 8.3274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=4/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -254,10 +237,6 @@

R0 Profile#> 1 8.3274 8.5274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=5/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -267,10 +246,6 @@

R0 Profile#> 1 8.5274 8.7274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=6/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -280,10 +255,6 @@

R0 Profile#> 1 8.7274 8.9274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=7/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -293,10 +264,6 @@

R0 Profile#> 1 8.9274 9.1274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=8/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -306,10 +273,6 @@

R0 Profile#> 1 9.1274 9.3274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=9/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -319,10 +282,6 @@

R0 Profile#> 1 9.3274 9.5274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=10/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -332,10 +291,6 @@

R0 Profile#> 1 9.5274 9.7274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> running profile i=11/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) @@ -345,10 +300,6 @@

R0 Profile#> 1 9.7274 9.9274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) -#> Executable found in directory /tmp/RtmpKDJxuj/profile -#> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 -#> Input 'show_in_console' = FALSE, so writing console output to console.output.txt -#> console output written to console.output.txt #> Value converged[whichruns] TOTAL Catch Equil_catch Survey #> 1 7.9274 TRUE 1067.570 4.40715e-01 16.620400 6.065520 #> 2 8.1274 TRUE 940.077 2.29735e-01 12.985200 1.965820 diff --git a/articles/residuals_files/figure-html/unnamed-chunk-6-1.png b/articles/residuals_files/figure-html/unnamed-chunk-6-1.png index d1e6152..0f39ac2 100644 Binary files a/articles/residuals_files/figure-html/unnamed-chunk-6-1.png and b/articles/residuals_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/pkgdown.yml b/pkgdown.yml index ee680ba..3bbe990 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -8,7 +8,7 @@ articles: hcxval: hcxval.html likelihood: likelihood.html residuals: residuals.html -last_built: 2024-02-02T20:02Z +last_built: 2024-02-02T20:12Z urls: reference: https://pifscstockassessments.github.io/ss3diags/reference article: https://pifscstockassessments.github.io/ss3diags/articles diff --git a/search.json b/search.json index e102f55..d073933 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://pifscstockassessments.github.io/ss3diags/CODE_OF_CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Code of Conduct","title":"Code of Conduct","text":"follow NFMS Fisheries Toolbox Code Conduct. NFMS Fisheries Toolbox Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html answers common questions code conduct, see https://www.contributor-covenant.org/faq","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to ss3diags","title":"Contributing to ss3diags","text":"Thank interest contributing! strive follow NMFS Fisheries Toolbox Contribution Guide. Note guidelines, rules, open collaborations ways may work better . Please feel free reach us opening issue repository emailing project maintatainer megumi.oshima@noaa.gov. project everyone participating governed NMFS Fisheries Toolbox Code Conduct. participating, expected uphold code. Please report unacceptable behavior fisheries.toolbox@noaa.gov. Note maintainers ss3diags access email account, unacceptable behavior maintainers can also reported .","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Jitter.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"Jitter Analysis","text":"run stock synthesis model, 4 input files required: starter, forecast, control, data. input files example model can found within ss3diags package accessed shown . Also, r4ss installed, need install tutorial. need make sure SS executable file either path directory running retrospective (case dir_jitter). easy way get latest release stock synthesis use r4ss function get_ss3_exe(). run model dir_jitter first produce necessary output files. recommended jitter runs subdirectory model run. keep output files separate diagnostic tests may run.","code":"install_github(\"r4ss/r4ss\") library(r4ss) files_path <- system.file(\"extdata\", package = \"ss3diags\") dir_jitter <- file.path(tempdir(check = TRUE), \"jitter\") dir.create(dir_jitter, showWarnings = FALSE, recursive = TRUE) list.files(files_path) #> [1] \"control.ss\" \"data.ss\" \"forecast.ss\" \"starter.ss\" file.copy(from = list.files(files_path, full.names = TRUE), to = dir_jitter) #> [1] TRUE TRUE TRUE TRUE r4ss::get_ss3_exe(dir = dir_jitter, version = \"v3.30.21\") #> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpQp3hSd/jitter/ss3 r4ss::run(dir = dir_jitter, exe = \"ss3\", verbose = FALSE) #> [1] \"ran model\""},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Jitter.html","id":"jitter","dir":"Articles","previous_headings":"","what":"Jitter","title":"Jitter Analysis","text":"example, run 50 jitters. jitter() function automates entire process need give arguments run produce total likelihoods run. analyze output 50 runs, use r4ss::SSgetoutput() r4ss::SSsummarize() shown . key sections may want check compare across models , likelihoods, derived quantities, estimated parameters. may also want check models converged. can check maximum gradients make sure small (< 0.0001). can also compare estimated spawning biomass, extreme values (+2x <0.5x base spawning biomass) suggests model didn’t converge.","code":"Njitter <- 5 jit.likes <- r4ss::jitter(dir = dir_jitter, Njitter = Njitter, init_values_src = 1, jitter_fraction = 0.1, exe = \"ss3\", printlikes = FALSE, verbose = FALSE) jit_mods <- SSgetoutput(keyvec = c(\"\",1:Njitter), #\"\" to include reference run (Report.sso) getcomp = FALSE, dirvec = dir_jitter, getcovar = FALSE, verbose = FALSE) jit_summary <- SSsummarize(jit_mods, verbose = FALSE) head(jit_summary$likelihoods) #> replist replist1 replist2 replist3 replist4 replist5 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> Label #> 1 TOTAL #> 2 Catch #> 3 Equil_catch #> 4 Survey #> 5 Length_comp #> 6 Age_comp head(jit_summary$quants) #> replist replist1 replist2 replist3 replist4 replist5 Label Yr #> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 SSB_Virgin NA #> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 SSB_Initial NA #> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 SSB_2011 2011 #> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 SSB_2012 2012 #> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 SSB_2013 2013 #> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 SSB_2014 2014 head(jit_summary$pars) #> replist replist1 replist2 replist3 replist4 replist5 #> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 #> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 #> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 #> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> Label Yr recdev #> 1 NatM_uniform_Fem_GP_1 NA FALSE #> 2 L_at_Amin_Fem_GP_1 NA FALSE #> 3 L_at_Amax_Fem_GP_1 NA FALSE #> 4 VonBert_K_Fem_GP_1 NA FALSE #> 5 CV_young_Fem_GP_1 NA FALSE #> 6 CV_old_Fem_GP_1 NA FALSE # Maximum gradient converged_grad <- which(jit_summary$maxgrad < 0.0001) converged_ssb <- jit_summary$SpawnBio %>% mutate(across(c(1:(Njitter+1)), .fns = ~./replist)) %>% # for each column, divide SSB by SSB from the reference run (replist0) select(-Label) %>% pivot_longer(col = c(1:(Njitter+1)), names_to = \"jitter\", values_to = \"SSB\") %>% pivot_wider(names_from = Yr, values_from = SSB) %>% mutate(rownumber = seq(1, nrow(.))) %>% tibble::column_to_rownames(\"jitter\") %>% filter_at(vars(1:(ncol(.)-1)), all_vars((.) < 2 & (.) > 0.5)) %>% #keep only select(rownumber) %>% pull(rownumber) converged_mods <- intersect(converged_grad, converged_ssb) #getting which models are in both groups converged_jitters <- jit_mods[converged_grad] converged_sum <- SSsummarize(converged_jitters, verbose = FALSE)"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Jitter.html","id":"visualizing-output","dir":"Articles","previous_headings":"","what":"Visualizing Output","title":"Jitter Analysis","text":"compare likelihoods runs, plot shown . built functions (writing recipe) r4ss ss3diags generate likelihood plot, therefore provide code tidyverse syntax (using ggplot2) visualize results. figure plots Total likelihood jitter run red line indicates total likelihood value reference run. runs points red line, use parameter values run lowest likelihood value. can also use r4ss::SSplotComparisons() compare spawning biomass trajectories jitter runs see impact different parameter values estimated quantities.","code":"converged_sum$likelihoods %>% filter(str_detect(Label, \"TOTAL\")) %>% select(-Label) %>% pivot_longer(cols = everything(), names_to = \"jitter\", values_to = \"likelihood\") %>% separate(jitter, into = c(\"replist\", \"jitter\"), sep = \"(?<=[A-Za-z])(?=[0-9])\") %>% mutate(jitter = as.numeric(jitter)) %>% ggplot(aes(x = jitter, y = likelihood)) + geom_point(size = 3) + geom_hline(aes(yintercept = likelihood[1]), color = \"red\") + theme_classic() + labs(y = \"Total Likelihood\", x = \"Jitter runs at a converged solution\") #> Warning: Expected 2 pieces. Missing pieces filled with `NA` in 1 rows #> [1]. #> Warning: Removed 1 rows containing missing values (`geom_point()`). SSplotComparisons(converged_sum, subplots = 2, ylimAdj=1) #> showing uncertainty for all models #> subplot 2: spawning biomass with uncertainty intervals"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"Retrospective Analysis","text":"run stock synthesis model, 4 input files required: starter, forecast, control, data. input files example model can found within ss3diags package accessed shown . Also, r4ss installed, need install tutorial. need make sure SS executable file either path directory running retrospective (case dir_retro). easy way get latest release stock synthesis use r4ss function get_ss3_exe().","code":"install.packages(\"pak\") pak::pkg_install(\"r4ss/r4ss\") library(r4ss) files_path <- system.file(\"extdata\", package = \"ss3diags\") dir_retro <- file.path(tempdir(check = TRUE), \"retrospectives\") dir.create(dir_retro, showWarnings = FALSE) list.files(files_path) #> [1] \"control.ss\" \"data.ss\" \"forecast.ss\" \"starter.ss\" file.copy(from = list.files(files_path, full.names = TRUE), to = dir_retro) #> [1] TRUE TRUE TRUE TRUE r4ss::get_ss3_exe(dir = dir_retro, version = \"v3.30.21\") #> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpdTAcjt/retrospectives/ss3"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"retrospective-analysis","dir":"Articles","previous_headings":"","what":"Retrospective Analysis","title":"Retrospective Analysis","text":"4 input files SS executable, can run retrospective analysis shown . running 5 1-year peels, run, last year data removed model re-run total 5 times. number year peels can adjusted years argument. SS executable file using named something “ss” (e.g. ss_opt_win.exe), need specify argument exe = \"ss_opt_win\".","code":"r4ss::retro(dir = dir_retro, exe = \"ss3\", years = 0:-5, verbose = FALSE) #> Warning in base::sink(type = \"output\", split = FALSE): no sink to remove"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"visualizing-output","dir":"Articles","previous_headings":"","what":"Visualizing Output","title":"Retrospective Analysis","text":"visualize output inspect patterns biases, need load report files R can use SSplotRetro() function ss3diags. easiest way load multiple report files using r4ss::SSgetoutput() r4ss::SSsummarize() functions. default sub-directories peel, 0 5, labeled retro0 retro-5. default settings plot spawning stock biomass time series peel, reference run (e.g. model years removed) “Ref” line successive peel colored lines labeled end year. solid line ends end year dashed line point shows 1 year forecast. Displaying projected SSB can help assess forecast bias. Note, forecasts done automatically using r4ss::retro() based settings forecast.ss. grey shaded area represents 95% confidence intervals uncertainty around spawning biomass time series. Displayed center plot combined Mohn’s \\(\\rho\\) retrospective runs, parentheses forecast Mohn’s \\(\\rho\\).","code":"retro_mods <- r4ss::SSgetoutput(dirvec = file.path(dir_retro, \"retrospectives\", paste0(\"retro\", seq(0,-5,by=-1))), verbose = F) retroSummary <- r4ss::SSsummarize(retro_mods, verbose = F) SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE) #> Mohn's Rho stats, including one step ahead forecasts: #> type peel Rho ForecastRho #> 1 SSB 2021 -0.20753686 -0.221050163 #> 2 SSB 2020 -0.19601072 -0.227304734 #> 3 SSB 2019 -0.29238505 -0.338600758 #> 4 SSB 2018 -0.00474920 -0.007462034 #> 5 SSB 2017 0.08716428 0.098849082 #> 6 SSB Combined -0.12270351 -0.139113722"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"customizing-the-plot","dir":"Articles","previous_headings":"Visualizing Output","what":"Customizing the Plot","title":"Retrospective Analysis","text":"Retro plots can customized many ways, common features may want specify : removing uncertainty intervals adjusting years shown x-axis turning 1-year ahead forecasting displaying combined \\(\\rho\\) value plot Examples changes shown , incrementally making adjustment. Additionally, fishing mortality can plotted instead spawning biomass replacing subplots = \"SSB\" subplots = \"F\"","code":"r4ss::sspar(mfrow = c(2, 2), plot.cex = 0.8) retro1 <- SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE, uncertainty = FALSE) #> Mohn's Rho stats, including one step ahead forecasts: retro2 <- SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE, uncertainty = FALSE, xlim = c(2015, 2022)) #> Mohn's Rho stats, including one step ahead forecasts: retro3 <- SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE, uncertainty = FALSE, xlim = c(2015, 2022), forecast = FALSE) #> Mohn's Rho stats, including one step ahead forecasts: retro4 <- SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE, uncertainty = FALSE, xlim = c(2015, 2022), forecast = FALSE, showrho = FALSE, forecastrho = FALSE) #> Mohn's Rho stats, including one step ahead forecasts:"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"summary-table","dir":"Articles","previous_headings":"Visualizing Output","what":"Summary Table","title":"Retrospective Analysis","text":"addition retrospective plots, summary statistics table can produced using SShcbias(). table includes type estimate (SSB F) year removed “peel” Mohn’s \\(\\rho\\) forecast bias year overall (“Combined”). Mohn’s \\(\\rho\\) measure severity bias retrospective patterns forecast bias estimate bias forecasted quantities years data removed. rule thumb proposed Hurtado-Ferror et al. (2014) Mohn’s \\(\\rho\\) values long-lived species, \\(\\rho\\) value fall -0.15 0.20.","code":"SShcbias(retroSummary) #> Mohn's Rho stats, including one step ahead forecasts: #> type peel Rho ForcastRho #> 1 SSB 2021 -0.20753686 -0.221050163 #> 2 SSB 2020 -0.19601072 -0.227304734 #> 3 SSB 2019 -0.29238505 -0.338600758 #> 4 SSB 2018 -0.00474920 -0.007462034 #> 5 SSB 2017 0.08716428 0.098849082 #> 6 SSB Combined -0.12270351 -0.139113722 #> 7 F 2021 0.28425747 0.285936183 #> 8 F 2020 0.30941305 0.349748774 #> 9 F 2019 0.52629045 0.632574831 #> 10 F 2018 0.01822898 0.022822958 #> 11 F 2017 -0.04896989 -0.053882358 #> 12 F Combined 0.21784401 0.247440078"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"ASPM","text":"run stock synthesis model, 4 input files required: starter, forecast, control, data. input files example model can found within ss3diags package accessed shown . Also, r4ss installed, need install tutorial. need make sure SS executable file either path directory running ASPM (case dir_aspm). easy way get latest release stock synthesis use r4ss function get_ss3_exe().","code":"install.packages(\"pak\") pak::pkg_install(\"r4ss/r4ss\") library(r4ss) files_path <- system.file(\"extdata\", package = \"ss3diags\") dir_tmp <- tempdir(check = TRUE) dir_aspm <- file.path(dir_tmp, \"aspm\") dir.create(dir_aspm, showWarnings = FALSE, recursive = TRUE) list.files(files_path) ## [1] \"control.ss\" \"data.ss\" \"forecast.ss\" \"starter.ss\" file.copy(from = list.files(files_path, full.names = TRUE), to = dir_tmp) ## [1] TRUE TRUE TRUE TRUE r4ss::get_ss3_exe(dir = dir_tmp, version = \"v3.30.21\") ## The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpW6yFM8/ss3"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"aspm","dir":"Articles","previous_headings":"","what":"ASPM","title":"ASPM","text":"4 input files, need determine components need turned run ASPM. ASPM depend index abundance catch data, composition data, recruitment deviations, etc. need turned . provide example includes multiple types data recruitment deviations, however, exact steps necessary individual model may vary depending complexity components included. Therefore steps may fully comprehensive model sure check components may need change. , show use r4ss functions make necessary changes control.ss ss.par files.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"generate-files","dir":"Articles","previous_headings":"ASPM","what":"Generate files","title":"ASPM","text":"order get ss.par file, need run model . also produce new data control file use input files. run model dir_tmp copy new files dir_aspm.","code":"r4ss::run(dir = dir_tmp, verbose = FALSE, exe = \"ss3\") ## [1] \"ran model\" files <- c(\"data_echo.ss_new\", \"control.ss_new\", \"starter.ss\", \"forecast.ss\", \"ss.par\", \"ss3\") file.copy(from = file.path(dir_tmp, files), to = dir_aspm) ## [1] TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"recruitment-deviations","dir":"Articles","previous_headings":"ASPM","what":"Recruitment Deviations","title":"ASPM","text":"Set recruitment devations ss.par 0.","code":"par <- SS_readpar_3.30(parfile = file.path(dir_aspm, \"ss.par\"), datsource = file.path(dir_aspm, \"data_echo.ss_new\"), ctlsource = file.path(dir_aspm, \"control.ss_new\"), verbose = FALSE) par$recdev1 ## year recdev ## [1,] 2011 -0.06005247 ## [2,] 2012 -0.01284866 ## [3,] 2013 0.13478706 ## [4,] 2014 0.11410144 ## [5,] 2015 -0.08325396 ## [6,] 2016 0.14556845 ## [7,] 2017 -0.12973978 ## [8,] 2018 -0.18308123 ## [9,] 2019 0.02442762 ## [10,] 2020 -0.08979813 ## [11,] 2021 -0.07812317 ## [12,] 2022 0.21801284 par$recdev_forecast ## year recdev ## [1,] 2023 0 ## [2,] 2024 0 ## [3,] 2025 0 ## [4,] 2026 0 ## [5,] 2027 0 ## [6,] 2028 0 ## [7,] 2029 0 ## [8,] 2030 0 ## [9,] 2031 0 ## [10,] 2032 0 par$recdev1[,\"recdev\"] <- 0 #Would run if forecasts recdevs were not already 0 #par$recdev_forecast[,\"recdev\"] <- 0 SS_writepar_3.30(parlist = par, outfile = file.path(dir_aspm, \"ss.par\"), overwrite = T, verbose = FALSE) ## $headerlines ## [1] \"# Number of parameters = 32 Objective function value = 754.301687441726 Maximum gradient component = 8.77017492766611e-07\" ## [2] \"# dummy_parm:\" ## [3] \"1.00000000000\" ## ## $MG_parms ## INIT ESTIM ## NatM_p_1_Fem_GP_1 0.10000000 0.10000000 ## L_at_Amin_Fem_GP_1 22.76900000 22.76899194 ## L_at_Amax_Fem_GP_1 71.80720000 71.80721125 ## VonBert_K_Fem_GP_1 0.14216500 0.14216482 ## CV_young_Fem_GP_1 0.10000000 0.10000000 ## CV_old_Fem_GP_1 0.10000000 0.10000000 ## Wtlen_1_Fem_GP_1 0.00000244 0.00000244 ## Wtlen_2_Fem_GP_1 3.34694000 3.34694000 ## Mat50%_Fem_GP_1 55.00000000 55.00000000 ## Mat_slope_Fem_GP_1 -0.25000000 -0.25000000 ## Eggs_alpha_Fem_GP_1 1.00000000 1.00000000 ## Eggs_beta_Fem_GP_1 0.00000000 0.00000000 ## NatM_p_1_Mal_GP_1 0.00000000 0.00000000 ## L_at_Amin_Mal_GP_1 0.00000000 0.00000000 ## L_at_Amax_Mal_GP_1 0.00000000 0.00000000 ## VonBert_K_Mal_GP_1 0.00000000 0.00000000 ## CV_young_Mal_GP_1 0.00000000 0.00000000 ## CV_old_Mal_GP_1 0.00000000 0.00000000 ## Wtlen_1_Mal_GP_1 0.00000244 0.00000244 ## Wtlen_2_Mal_GP_1 3.34694000 3.34694000 ## CohortGrowDev 1.00000000 1.00000000 ## FracFemale_GP_1 0.50000000 0.50000000 ## ## $SR_parms ## INIT ESTIM ## SR_LN(R0) 8.9274 8.927395 ## SR_BH_steep 0.8000 0.800000 ## SR_sigmaR 0.6000 0.600000 ## SR_regime 0.0000 0.000000 ## SR_autocorr 0.0000 0.000000 ## ## $recdev1 ## year recdev ## [1,] 2011 0 ## [2,] 2012 0 ## [3,] 2013 0 ## [4,] 2014 0 ## [5,] 2015 0 ## [6,] 2016 0 ## [7,] 2017 0 ## [8,] 2018 0 ## [9,] 2019 0 ## [10,] 2020 0 ## [11,] 2021 0 ## [12,] 2022 0 ## ## $recdev_forecast ## year recdev ## [1,] 2023 0 ## [2,] 2024 0 ## [3,] 2025 0 ## [4,] 2026 0 ## [5,] 2027 0 ## [6,] 2028 0 ## [7,] 2029 0 ## [8,] 2030 0 ## [9,] 2031 0 ## [10,] 2032 0 ## ## $init_F ## [1] 0.1 ## ## $Q_parms ## INIT ESTIM ## LnQ_base_SURVEY1(2) 0.476759 0.4767585 ## Q_extraSD_SURVEY1(2) 0.000000 0.0000000 ## LnQ_base_SURVEY2(3) -6.304070 -6.3040672 ## ## $S_parms ## INIT ESTIM ## SizeSel_P_1_FISHERY(1) 56.51380 56.513807 ## SizeSel_P_2_FISHERY(1) 20.17930 20.179340 ## SizeSel_P_1_SURVEY1(2) 36.02330 36.023325 ## SizeSel_P_2_SURVEY1(2) 5.33502 5.335021 ## AgeSel_P_1_SURVEY2(3) 0.00000 0.000000 ## AgeSel_P_2_SURVEY2(3) 0.00000 0.000000"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"starter-file","dir":"Articles","previous_headings":"ASPM","what":"Starter File","title":"ASPM","text":"Change starter file read ss.par (init_values_src = 1) use new data control files.","code":"starter <- SS_readstarter(file = file.path(dir_aspm, \"starter.ss\"), verbose = FALSE) starter$datfile <- \"data_echo.ss_new\" starter$ctlfile <- \"control.ss_new\" starter$init_values_src <- 1 SS_writestarter(starter, dir = dir_aspm, overwrite = TRUE, verbose = FALSE, warn = FALSE) ## Warning: The `warn` argument of `SS_writestarter()` is deprecated as of r4ss 1.45.0. ## This warning is displayed once every 8 hours. ## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was ## generated."},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"control-file","dir":"Articles","previous_headings":"ASPM","what":"Control File","title":"ASPM","text":"things control file may need changed, phases parameters : length selectivity age selectivity size selectivity steepness sigmaR recruitment deviations Additionally, likelihood components may need turned well. can using lambda options control file. examples include: length-composition data age-composition data size-composition data initial F","code":"control <- SS_readctl_3.30(file = file.path(dir_aspm, \"control.ss_new\"), datlist = file.path(dir_aspm, \"data_echo.ss_new\"), verbose = FALSE) control$SR_parms ## LO HI INIT PRIOR PR_SD PR_type PHASE env_var&link dev_link ## SR_LN(R0) 6.0 12 8.9274 10.3 10.0 0 1 0 0 ## SR_BH_steep 0.2 1 0.8000 0.8 1.0 0 -4 0 0 ## SR_sigmaR 0.0 2 0.6000 0.8 0.8 0 -4 0 0 ## SR_regime -5.0 5 0.0000 0.0 1.0 0 -4 0 0 ## SR_autocorr 0.0 0 0.0000 0.0 0.0 0 -99 0 0 ## dev_minyr dev_maxyr dev_PH Block Block_Fxn ## SR_LN(R0) 0 0 0 0 0 ## SR_BH_steep 0 0 0 0 0 ## SR_sigmaR 0 0 0 0 0 ## SR_regime 0 0 0 0 0 ## SR_autocorr 0 0 0 0 0 # Would need to run if PHASES were positive for \"steep\" and \"sigmaR\" #control$SR_parms[c(2,3),\"PHASE\"] <- c(-4,-4) control$age_selex_parms ## LO HI INIT PRIOR PR_SD PR_type PHASE env_var&link ## AgeSel_P_1_SURVEY2(3) 0 20 0 5 99 0 -99 0 ## AgeSel_P_2_SURVEY2(3) 0 20 0 6 99 0 -99 0 ## dev_link dev_minyr dev_maxyr dev_PH Block Block_Fxn ## AgeSel_P_1_SURVEY2(3) 0 0 0 0 0 0 ## AgeSel_P_2_SURVEY2(3) 0 0 0 0 0 0 #would need to run if PHASES were positive for age selectivity #control$age_selex_parms[,\"PHASE\"] <- control$age_selex_parms[,\"PHASE\"] * -1 control$size_selex_parms[,\"PHASE\"] <- control$size_selex_parms[,\"PHASE\"] * -1 control$recdev_early_phase <- -4 control$recdev_phase <- -2 new_lambdas <- data.frame(like_comp = c(4,4,5,5,7,7,9,9,9,10), fleet = c(1,2,1,2,1,2,1,2,3,1), phase = rep(1, 10), value = rep(0, 10), sizefreq_method = rep(1, 10)) new_lambdas ## like_comp fleet phase value sizefreq_method ## 1 4 1 1 0 1 ## 2 4 2 1 0 1 ## 3 5 1 1 0 1 ## 4 5 2 1 0 1 ## 5 7 1 1 0 1 ## 6 7 2 1 0 1 ## 7 9 1 1 0 1 ## 8 9 2 1 0 1 ## 9 9 3 1 0 1 ## 10 10 1 1 0 1 control$lambdas <- new_lambdas control$N_lambdas <- nrow(new_lambdas) SS_writectl_3.30(control, outfile = file.path(dir_aspm, \"control.ss_new\"), overwrite = TRUE, verbose = FALSE)"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"run-aspm","dir":"Articles","previous_headings":"ASPM","what":"Run ASPM","title":"ASPM","text":"","code":"r4ss::run(dir = dir_aspm, exe = \"ss3\", skipfinished = FALSE, verbose = FALSE) ## [1] \"ran model\""},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"visualize-results","dir":"Articles","previous_headings":"ASPM","what":"Visualize Results","title":"ASPM","text":"","code":"mods <- SSgetoutput(dirvec = c( dir_tmp, dir_aspm ), verbose = FALSE) mods_sum <- SSsummarize(mods, verbose = FALSE) SSplotComparisons(mods_sum, legendlabels = c(\"Ref\", \"ASPM\"), subplots = c(2,8,14), new = F) ## showing uncertainty for all models ## subplot 2: spawning biomass with uncertainty intervals ## subplot 8: F value with uncertainty ## subplot 14: index fits on a log scale"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/hcxval.html","id":"visualizing-output","dir":"Articles","previous_headings":"","what":"Visualizing Output","title":"Hindcast Cross-Validation","text":"HCxval implemented using ss3diags::SSplotHCxval(), produces novel HCxval diagnostic plot computes MASE scores indices abundance, mean lengths, mean ages observations falling within hindcast evaluation period. Plotting HCxval abundance indices requires step summarizing list retrospective runs retrospective analysis, therefore needs done . example use retroSummary created . plots , see fleets, model fairly good prediction skill (compared random walk) index abundance data. plots, white points white dashed line observed data included model truncated time series. larger colored points observed data retrospective peel (.e. data removed peel). smaller colored point dashed line show model predicted value. “Ref” line model run complete time series data. grey shaded areas represent uncertainty data, darker portion indicating portion included model lighter portion indicating ones removed projected. MASE scores displayed MASE adjusted MASE parentheses.","code":"r4ss::sspar(mfrow = c(1,2)) SSplotHCxval(retroSummary, subplots = \"cpue\", add = TRUE) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with only 1 of 5 prediction residuals for Index SURVEY1 #> #> Warning: Unequal spacing of naive predictions residuals may influence the interpretation of MASE #> #> Computing MASE with all 5 of 5 prediction residuals for Index SURVEY2 #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 SURVEY1 1 0.5026435 0.08879379 0.1766536 0.5026435 1 #> 2 SURVEY2 1 0.6149530 0.37737925 0.6136717 0.6149530 5"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/hcxval.html","id":"composition-data","dir":"Articles","previous_headings":"Visualizing Output","what":"Composition Data","title":"Hindcast Cross-Validation","text":"visualize mean length mean age, need add additional step. forecast length- age-composition information stored “ghost files” SS report.sso file, need use ss3diags::SSretroComps() extract summarize information creating plots.","code":"retroSummary_comps <- SSretroComps(retro_mods) r4ss::sspar(mfrow = c(1,2)) hcl <- SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, ylim = c(40,75)) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> Computing MASE with only 1 of 5 prediction residuals for Index SURVEY1 #> #> Warning: Unequal spacing of naive predictions residuals may influence the interpretation of MASE #> #> MASE stats by Index:"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/hcxval.html","id":"customizing-the-plot","dir":"Articles","previous_headings":"Visualizing Output","what":"Customizing the Plot","title":"Hindcast Cross-Validation","text":"HCxval plots can customized many ways, common features may want specify : displaying specific fleet removing uncertainty intervals adjusting x- y-axis displaying adjusted MASE value plot Examples changes shown , incrementally making adjustment.","code":"r4ss::sspar(mfrow = c(2,2)) SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, indexselect = 1) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5 SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, indexselect = 1, indexUncertainty = FALSE) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5 SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, indexselect = 1, indexUncertainty = FALSE, ylim = c(45,70)) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5 SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, indexselect = 1, indexUncertainty = FALSE, ylim = c(45,70), show.mase.adj = F) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/hcxval.html","id":"summary-table","dir":"Articles","previous_headings":"","what":"Summary Table","title":"Hindcast Cross-Validation","text":"addition HCxval plots, summary statistics table can produced using ss3diags::SSmase(). table includes: Index - fleet Season MASE - MASE score MAE.PR - mean absolute error prediction residuals MASE.base - naive prediction MASE.adj - adjusted MASE score n.eval - number points prediction skill calculated Adjusted MASE gets invoked cases inter-annual variation observed values small (default MAE < 0.1 naive predictions log(y[t+1])-log(y[t])). reasoning prediction residuals must already accurate fall threshold. adjusted MASE essential keep naive prediction MAE denominator MASE maximum. show effect changing adjustment threshold default MAE.base.adj = 0.1 larger value MAE.base.adj = 0.15 MASE ratio mean absolute error prediction residuals MAE.PR residuals naive predictions MAE.base MASE.adj","code":"mase1 = SSmase(retroSummary_comps, quant=\"len\", MAE.base.adj = 0.1) mase1 #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5 #> 2 SURVEY1 1 0.6526074 0.05142002 0.07879167 0.5142002 1 #> 3 joint 0.4628955 0.01719056 0.03713702 0.1719056 6 SSmase(retroSummary_comps, quant=\"len\", MAE.base.adj = 0.15) #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.06896444 5 #> 2 SURVEY1 1 0.6526074 0.05142002 0.07879167 0.34280015 1 #> 3 joint 0.4628955 0.01719056 0.03713702 0.11460372 6 mase1$MAE.PR/mase1$MAE.base #> [1] 0.3591138 0.6526074 0.4628955 mase1$MASE #> [1] 0.3591138 0.6526074 0.4628955 mase1$MAE.PR/pmax(mase1$MAE.base,0.1) #> [1] 0.1034467 0.5142002 0.1719056 mase1$MASE.adj #> [1] 0.1034467 0.5142002 0.1719056"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/likelihood.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"Likelihood Profile","text":"run stock synthesis model, 4 input files required: starter, forecast, control, data. input files example model can found within ss3diags package accessed shown . Also, r4ss installed, need install tutorial. need make sure SS executable file either path directory running profile (case dir_profile). easy way get latest release stock synthesis use r4ss function get_ss3_exe().","code":"install.packages(\"pak\") pak::pkg_install(\"r4ss/r4ss\") library(r4ss) files_path <- system.file(\"extdata\", package = \"ss3diags\") dir_tmp <- tempdir(check = TRUE) dir_profile <- file.path(dir_tmp, \"profile\") dir.create(dir_profile, showWarnings = FALSE, recursive = TRUE) list.files(files_path) #> [1] \"control.ss\" \"data.ss\" \"forecast.ss\" \"starter.ss\" file.copy(from = list.files(files_path, full.names = TRUE), to = dir_tmp) #> [1] TRUE TRUE TRUE TRUE r4ss::get_ss3_exe(dir = dir_tmp, version = \"v3.30.21\") #> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpKDJxuj/ss3"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/likelihood.html","id":"r0-profile","dir":"Articles","previous_headings":"","what":"R0 Profile","title":"Likelihood Profile","text":"4 input files SS executable, can run likelihood profile shown . first step run model like profile . dir_tmp copy necessary files dir_profile. ’s best run profile subdirectory main model run keep output files separate diagnostic tests may run. input files need dir_profile need create vector values profile across. range increments choose depend model resolution want analyze likelihood profile. example use fairly course resolution speed total run time. also need modify starter file changing name control file read making sure likelihood calculated non-estimated quantities. run profile, use r4ss::profile() need specify partial string name parameter profiling (case “SR_LN” match “SR_LN(R0)”), vector values profile across. newctlfile control file adjusted values profilevec can named anything prefer, just needs match put starter file “cltfile”.","code":"r4ss::run(dir = dir_tmp, exe = \"ss3\", verbose = FALSE) #> [1] \"ran model\" files <- c(\"data.ss\", \"control.ss_new\", \"starter.ss\", \"forecast.ss\", \"ss.par\", \"ss3\") file.copy(from = file.path(dir_tmp, files), to = dir_profile) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE CTL <- SS_readctl_3.30(file = file.path(dir_profile, \"control.ss_new\"), datlist = file.path(dir_profile, \"data.ss\")) CTL$SR_parms #> LO HI INIT PRIOR PR_SD PR_type PHASE env_var&link dev_link #> SR_LN(R0) 6.0 12 8.9274 10.3 10.0 0 1 0 0 #> SR_BH_steep 0.2 1 0.8000 0.8 1.0 0 -4 0 0 #> SR_sigmaR 0.0 2 0.6000 0.8 0.8 0 -4 0 0 #> SR_regime -5.0 5 0.0000 0.0 1.0 0 -4 0 0 #> SR_autocorr 0.0 0 0.0000 0.0 0.0 0 -99 0 0 #> dev_minyr dev_maxyr dev_PH Block Block_Fxn #> SR_LN(R0) 0 0 0 0 0 #> SR_BH_steep 0 0 0 0 0 #> SR_sigmaR 0 0 0 0 0 #> SR_regime 0 0 0 0 0 #> SR_autocorr 0 0 0 0 0 #getting the estimated r0 value r0 <- CTL$SR_parms$INIT[1] #creating a vector that is +/- 1 unit away from the estimated value in increments of 0.2 r0_vec <- seq(r0-1, r0+1, by = 0.2) r0_vec #> [1] 7.9274 8.1274 8.3274 8.5274 8.7274 8.9274 9.1274 9.3274 9.5274 9.7274 #> [11] 9.9274 START <- SS_readstarter(file = file.path(dir_profile, \"starter.ss\"), verbose = FALSE) START$prior_like <- 1 START$ctlfile <- \"control_modified.ss\" SS_writestarter(START, dir = dir_profile, overwrite = TRUE, verbose = F) profile(dir = dir_profile, newctlfile = \"control_modified.ss\", string = \"SR_LN\", profilevec = r0_vec, exe = \"ss3\", verbose = TRUE) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Doing runs: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, #> out of n = 11 #> Changing working directory to /tmp/RtmpKDJxuj/profile, #> but will be changed back on exit from function. #> running profile i=1/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.9274 7.9274 1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=2/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 7.9274 8.1274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=3/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.1274 8.3274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=4/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.3274 8.5274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=5/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.5274 8.7274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=6/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.7274 8.9274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=7/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.9274 9.1274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=8/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 9.1274 9.3274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=9/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 9.3274 9.5274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=10/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 9.5274 9.7274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> running profile i=11/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 9.7274 9.9274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Executable found in directory /tmp/RtmpKDJxuj/profile #> Changing working directory to /tmp/RtmpKDJxuj/profile and running model using the command: ./ss3 #> Input 'show_in_console' = FALSE, so writing console output to console.output.txt #> console output written to console.output.txt #> Value converged[whichruns] TOTAL Catch Equil_catch Survey #> 1 7.9274 TRUE 1067.570 4.40715e-01 16.620400 6.065520 #> 2 8.1274 TRUE 940.077 2.29735e-01 12.985200 1.965820 #> 3 8.3274 TRUE 844.236 1.08857e-01 9.799480 -2.132340 #> 4 8.5274 TRUE 790.513 9.17170e-06 3.930790 -5.726270 #> 5 8.7274 TRUE 762.562 6.48948e-08 0.271032 -7.140910 #> 6 8.9274 TRUE 754.302 1.33458e-10 0.174869 -7.118110 #> 7 9.1274 TRUE 758.927 2.10816e-13 1.337060 -6.106700 #> 8 9.3274 TRUE 767.708 1.90347e-13 3.424990 -4.917570 #> 9 9.5274 TRUE 777.243 1.15331e-13 6.433440 -3.857200 #> 10 9.7274 TRUE 787.189 6.73658e-14 10.382600 -2.563580 #> 11 9.9274 TRUE 798.152 4.05051e-14 15.279300 -0.380771 #> Length_comp Age_comp Size_at_age Recruitment InitEQ_Regime #> 1 453.198 341.340 230.715 19.181500 0.00000e+00 #> 2 418.750 291.595 201.557 12.989400 0.00000e+00 #> 3 393.384 257.968 179.068 6.036600 0.00000e+00 #> 4 379.721 243.456 167.416 1.713560 1.54502e-30 #> 5 370.420 234.970 163.525 0.515980 1.54502e-30 #> 6 366.756 231.845 162.399 0.244060 1.54502e-30 #> 7 367.497 233.210 162.675 0.312441 0.00000e+00 #> 8 369.543 235.957 163.170 0.529082 0.00000e+00 #> 9 371.605 238.622 163.598 0.839498 1.54502e-30 #> 10 373.376 240.872 163.942 1.178030 0.00000e+00 #> 11 374.815 242.718 164.208 1.510550 0.00000e+00 #> Forecast_Recruitment Parm_priors Parm_softbounds Parm_devs Crash_Pen #> 1 0 0 0.00756177 0 0 #> 2 0 0 0.00433602 0 0 #> 3 0 0 0.00337783 0 0 #> 4 0 0 0.00197985 0 0 #> 5 0 0 0.00143663 0 0 #> 6 0 0 0.00141332 0 0 #> 7 0 0 0.00150262 0 0 #> 8 0 0 0.00159065 0 0 #> 9 0 0 0.00166199 0 0 #> 10 0 0 0.00171844 0 0 #> 11 0 0 0.00176282 0 0"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/likelihood.html","id":"visualizing-output","dir":"Articles","previous_headings":"","what":"Visualizing Output","title":"Likelihood Profile","text":"profile finished running, can visualize results determine conflict data sources. data sources reach minimum R0 value, indicates good agreement . However, likely, one minimized different R0 values global R0 value. sign conflict data sources may require consider data weighting. profile plot shows changes log-likelihood across vector values profiled total likelihood contributing components. minimum threshold component must contribute data source model show plot, contribution may large enough. steepness trajectory indicates informative () data source . example, age data plot much steeper left side minimum R0 value index data, suggests age composition data informative model. can also plot data-type fleet-specific profiles using r4ss::PinerPlot(). plotting profile length composition data fleet likelihood survey data fleet. allow us see conflicts sources main drivers.","code":"profile_mods <- SSgetoutput(dirvec = dir_profile, keyvec = 1:length(r0_vec), verbose = FALSE) profile_mods_sum <- SSsummarize(profile_mods, verbose = FALSE) SSplotProfile(profile_mods_sum, profile.string = \"SR_LN\", profile.label = \"SR_LN(R0)\") #> Parameter matching profile.string=SR_LN: SR_LN(R0) #> Parameter values (after subsetting based on input 'models'): 7.9274, 8.1274, 8.3274, 8.5274, 8.7274, 8.9274, 9.1274, 9.3274, 9.5274, 9.7274, 9.9274 #> Likelihood components showing max change as fraction of total change. #> To change which components are included, change input 'minfraction'. #> frac_change include label #> TOTAL 1.0000 TRUE Total #> Catch 0.0014 FALSE Catch #> Equil_catch 0.0525 TRUE Equilibrium catch #> Survey 0.0422 TRUE Index data #> Length_comp 0.2759 TRUE Length data #> Age_comp 0.3495 TRUE Age data #> Size_at_age 0.2181 TRUE Size-at-age data #> Recruitment 0.0605 TRUE Recruitment #> InitEQ_Regime 0.0000 FALSE Initital equilibrium recruitment #> Forecast_Recruitment 0.0000 FALSE Forecast recruitment #> Parm_priors 0.0000 FALSE Priors #> Parm_softbounds 0.0000 FALSE Soft bounds #> Parm_devs 0.0000 FALSE Parameter deviations #> Crash_Pen 0.0000 FALSE Crash penalty sspar(mfrow = c(1,2)) PinerPlot(profile_mods_sum, component = \"Length_like\", main = \"Length\") #> Parameter matching profile.string = 'R0': 'SR_LN(R0) #> Parameter values (after subsetting based on input 'models'): 7.9274, 8.1274, 8.3274, 8.5274, 8.7274, 8.9274, 9.1274, 9.3274, 9.5274, 9.7274, 9.9274, #> Fleet-specific likelihoods showing max change as fraction of total change. #> To change which components are included, change input 'minfraction'. #> frac_change include #> FISHERY 0.6825 TRUE #> SURVEY1 0.3208 TRUE #> SURVEY2 0.0000 FALSE PinerPlot(profile_mods_sum, component = \"Surv_like\", main = \"Survey\") #> Parameter matching profile.string = 'R0': 'SR_LN(R0) #> Parameter values (after subsetting based on input 'models'): 7.9274, 8.1274, 8.3274, 8.5274, 8.7274, 8.9274, 9.1274, 9.3274, 9.5274, 9.7274, 9.9274, #> Fleet-specific likelihoods showing max change as fraction of total change. #> To change which components are included, change input 'minfraction'. #> frac_change include #> FISHERY 0.0000 FALSE #> SURVEY1 0.3218 TRUE #> SURVEY2 0.9202 TRUE"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/residuals.html","id":"runs-test","dir":"Articles","previous_headings":"","what":"Runs Test","title":"Residual Analyses","text":"runs test nonparametric hypothesis test randomness data sequence calculates 2-sided p-value estimate number runs (.e., sequences values sign) reference value. runs test can diagnose model misspecification using residuals fits index composition data (Carvalho et al. 2017) testing non-random patterns residuals. addition, three-sigma limits can considered useful identifying potential outliers data point three standard deviations away expected residual process average unlikely given random process error observed residual distribution. example using “simple_small” SS model included within r4ss package. can read report file model output using r4ss::SS_output() function shown . output SSplotRunstest() includes plot residuals fleet table results runs test ‘three-sigma limit’ values. plots , shaded area represents ‘three-sigma limit’, three residual standard deviations zero. individual residual points fall outside three-sigma limit, colored red. Green shaded area indicates residuals randomly distributed (p-value >= 0.05) whereas red shaded area indicates residuals randomly distributed. Failing runs test (p-value < 0.05) can indicative misspecification conflict indices composition data.","code":"library(r4ss) files_path <- system.file(\"extdata\", \"simple_small\", package = \"r4ss\") report <- SS_output(dir = files_path, verbose = FALSE, printstats = FALSE) sspar(mfrow = c(1,2)) SSplotRunstest(report, add = TRUE) #> Running Runs Test Diagnostics w/ plots forIndex #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Index: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.159 Passed -0.7301441 0.7301441 cpue #> 2 SURVEY2 0.887 Passed -1.1052361 1.1052361 cpue"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/residuals.html","id":"customizing-the-plot","dir":"Articles","previous_headings":"Runs Test","what":"Customizing the Plot","title":"Residual Analyses","text":"Runs test plots can customized, common features may want specify : plotting data types (default Index Abundance) plotting specific fleet(s) adjusting y-axis range plot data types, can specified subplots argument, options include “cpue”, “len”, “age”, “size”, “con”. “con” conditional size--age data “size” generalized size composition data. Fleets can specified using indexselect() function, takes vector fleet numbers plot. Note small adjustment automatically added ylim provide extra white space. third plot, even though set y-axis range -0.5 0.5, y-axis goes -0.6 0.6. want extra space, set ylimAdj = 1 done 4th plot.","code":"sspar(mfrow = c(2,2)) SSplotRunstest(report, subplots = \"len\", indexselect = 1, add = TRUE) #> Running Runs Test Diagnostics w/ plots forMean length #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Mean length: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 FISHERY 0.126 Passed -0.0613176 0.0613176 len SSplotRunstest(report, subplots = \"age\", indexselect = 2, add = TRUE) #> Running Runs Test Diagnostics w/ plots forMean age #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Mean age: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.11 Passed -0.2743816 0.2743816 age SSplotRunstest(report, subplots = \"age\", indexselect = 2, add = TRUE, ylim = c(-0.5, 0.5)) #> Running Runs Test Diagnostics w/ plots forMean age #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Mean age: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.11 Passed -0.2743816 0.2743816 age SSplotRunstest(report, subplots = \"age\", indexselect = 2, add = TRUE, ylim = c(-0.5, 0.5), ylimAdj = 1) #> Running Runs Test Diagnostics w/ plots forMean age #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Mean age: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.11 Passed -0.2743816 0.2743816 age"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/residuals.html","id":"summary-table","dir":"Articles","previous_headings":"Runs Test","what":"Summary Table","title":"Residual Analyses","text":"addition residual plots, SSplotRunstest() produces summary table runs test output values, including: p-value runs test test passed failed (indicated green red shading plot) upper lower limits 3-sigma interval type data tested (CPUE, length-composition, age-composition, conditional age--length) produce summary table skip plot, e.g. faciliate automated processing, use SSrunstest().","code":"rcpue <- SSrunstest(report, quants = \"cpue\") #> Running Runs Test Diagnosics for Index #> Computing Residual Runs Tests #> Residual Runs Test stats by Index: rlen <- SSrunstest(report, quants = \"len\") #> Running Runs Test Diagnosics for Mean length #> Computing Residual Runs Tests #> Residual Runs Test stats by Mean length: rbind(rcpue, rlen) #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.159 Passed -0.7301441 0.7301441 cpue #> 2 SURVEY2 0.887 Passed -1.1052361 1.1052361 cpue #> 3 FISHERY 0.126 Passed -0.0613176 0.0613176 len #> 4 SURVEY1 0.841 Passed -0.1725225 0.1725225 len"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/residuals.html","id":"rmse","dir":"Articles","previous_headings":"","what":"RMSE","title":"Residual Analyses","text":"RMSE root mean square error useful evaluating far predictions fall observed data. ss3diags::SSplotJABBAres() function allows visualize full time series residuals fleets indicated data (index abundance composition). example , plot residuals index abundance, mean age (age-composition), mean length (length composition) fleets. plots , point represents difference observed expected value (residual) color-coded correspond specific fleet. solid, color-coded vertical lines horizontal dashed line (y = 0) show distance 0 residual value. Box plots summarize spread residual values across fleets within year thick solid black line loess smoother fit residual points. Total RMSE displayed top right corner. assessing plot, important see patterns trends residuals, large overall RMSE , whether data different fleets generally agrees conflicts . retrieve just RMSE residual values without generating plot, SSrmse() produces named list 2 objects, RMSE residuals. can accessed shown . function useful automating analyses.","code":"sspar(mfrow = c(2,2)) SSplotJABBAres(report, subplots = \"cpue\", add = TRUE) #> Plotting JABBA residual plot. #> is plot TRUE? TRUE #> drawing plot at #> Plot exists: #> RMSE stats by Index: #> # A tibble: 3 × 3 #> Fleet RMSE.perc Nobs #> #> 1 SURVEY1 21.6 4 #> 2 SURVEY2 27.7 12 #> 3 Combined 26.3 16 SSplotJABBAres(report, subplots = \"age\", add = TRUE) #> Plotting JABBA residual plot. #> is plot TRUE? TRUE #> drawing plot at #> Plot exists: #> RMSE stats by Index: #> # A tibble: 3 × 3 #> Fleet RMSE.perc Nobs #> #> 1 FISHERY 9 12 #> 2 SURVEY1 8.1 4 #> 3 Combined 8.8 16 SSplotJABBAres(report, subplots = \"len\", add = TRUE, ylim = c(-0.2,0.2)) #> Plotting JABBA residual plot. #> is plot TRUE? TRUE #> drawing plot at #> Plot exists: #> RMSE stats by Index: #> # A tibble: 3 × 3 #> Fleet RMSE.perc Nobs #> #> 1 FISHERY 2.1 12 #> 2 SURVEY1 3.4 4 #> 3 Combined 2.5 16 rmse <- SSrmse(report, quants = \"cpue\")$RMSE residuals <- SSrmse(report, quants = \"cpue\")$residuals rmse #> # A tibble: 3 × 3 #> Fleet RMSE.perc Nobs #> #> 1 SURVEY1 21.6 4 #> 2 SURVEY2 27.7 12 #> 3 Combined 26.3 16 head(residuals) #> Fleet Fleet_name Area Yr Seas Subseas Month Time Vuln_bio Obs #> 925 2 SURVEY1 1 2013 1 2 7 2013.5 62947.50 144745.0000 #> 926 2 SURVEY1 1 2016 1 2 7 2016.5 49335.70 63760.3000 #> 927 2 SURVEY1 1 2019 1 2 7 2019.5 38132.00 59242.9000 #> 928 2 SURVEY1 1 2022 1 2 7 2022.5 34045.80 49649.7000 #> 929 3 SURVEY2 1 2011 1 2 7 2011.5 6306.83 11.5668 #> 930 3 SURVEY2 1 2012 1 2 7 2012.5 6544.96 13.9955 #> Exp Calc_Q Eff_Q SE SE_input Dev Like #> 925 101399.0000 1.61084000 1.61084000 0.3 0.3 0.35591400 7.03749e-01 #> 926 79472.2000 1.61084000 1.61084000 0.3 0.3 -0.22027600 2.69564e-01 #> 927 61424.7000 1.61084000 1.61084000 0.3 0.3 -0.03616590 7.26653e-03 #> 928 54842.4000 1.61084000 1.61084000 0.3 0.3 -0.09947210 5.49706e-02 #> 929 11.5342 0.00182885 0.00182885 0.7 0.7 0.00281831 8.10497e-06 #> 930 11.9698 0.00182885 0.00182885 0.7 0.7 0.15635300 2.49451e-02 #> Like+log(s) SuprPer Use residuals #> 925 -0.500223 NA 1 0.355910344 #> 926 -0.934409 NA 1 -0.220276535 #> 927 -1.196710 NA 1 -0.036166093 #> 928 -1.149000 NA 1 -0.099471269 #> 929 -0.356667 NA 1 0.002822391 #> 930 -0.331730 NA 1 0.156349038"},{"path":"https://pifscstockassessments.github.io/ss3diags/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Henning Winker. Author. Felipe Carvalho. Author. Massimiliano Cardinale. Author. Laurence Kell. Author. Megumi Oshima. Author, maintainer. Eric Fletcher. Author.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Winker H, Carvalho F, Cardinale M, Kell L, Oshima M, Fletcher E (2024). ss3diags: Stock Synthesis Model Diagnostics Intergated Stock Assessments. R package version 2.1.1, https://github.com/PIFSCstockassessments/ss3diags.","code":"@Manual{, title = {ss3diags: Stock Synthesis Model Diagnostics for Intergated Stock Assessments}, author = {Henning Winker and Felipe Carvalho and Massimiliano Cardinale and Laurence Kell and Megumi Oshima and Eric Fletcher}, year = {2024}, note = {R package version 2.1.1}, url = {https://github.com/PIFSCstockassessments/ss3diags}, }"},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"ss3diags-","dir":"","previous_headings":"","what":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"R package ss3diags enables users apply advanced diagnostics evaluate Stock Synthesis model. Diagnostics include residual analyses, hindcast cross-validation techniques, retrospective analyses. Functions also allow users reproduce key model diagnostics plots presented paper ‘Cookbook Using Model Diagnostics Integrated Stock Assessments’. ss3diags Github repository provides step--step R recipes : Run jitter analysis Conduct retrospective analysis Use hindcast cross-validation log-likelood profiling R0 Run ASPM diagnostic Evaluate model fit Stock Synthesis making use comprehensive collection R functions available R packages r4ss ss3diags.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"ss3diags currently supported CRAN. can install development version ss3diags GitHub : package installed can loaded : examples run common diagnostic tests SS models visualize results diagnostic tests using r4ss ss3diags packages, please refer articles package website.","code":"# install.packages(\"remotes\") remotes::install_github(\"PIFSCstockassessments/ss3diags\") library(ss3diags)"},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"contributing-to-ss3diags","dir":"","previous_headings":"","what":"Contributing to ss3diags","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"like contribute ss3diags suggestions diagnostic tests include package, can submit new issue contact Meg megumi.oshima@noaa.gov.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"reference","dir":"","previous_headings":"","what":"Reference","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"cite ss3diags publication can use","code":"citation(\"ss3diags\") #> #> To cite package 'ss3diags' in publications use: #> #> Henning Winker, Felipe Carvalho, Massimiliano Cardinale, Laurence #> Kell, Megumi Oshima and Eric Fletcher (2023). ss3diags: Stock #> Synthesis Model Diagnostics for Intergated Stock Assessments. R #> package version 2.1.1. #> https://github.com/PIFSCstockassessments/ss3diags #> #> A BibTeX entry for LaTeX users is #> #> @Manual{, #> title = {ss3diags: Stock Synthesis Model Diagnostics for Intergated Stock Assessments}, #> author = {Henning Winker and Felipe Carvalho and Massimiliano Cardinale and Laurence Kell and Megumi Oshima and Eric Fletcher}, #> year = {2023}, #> note = {R package version 2.1.1}, #> url = {https://github.com/PIFSCstockassessments/ss3diags}, #> }"},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"disclaimer","dir":"","previous_headings":"","what":"Disclaimer","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"United States Department Commerce (DOC) GitHub project code provided ‘’ basis user assumes responsibility use. DOC relinquished control information longer responsibility protect integrity, confidentiality, availability information. claims Department Commerce stemming use GitHub project governed applicable Federal law. reference specific commercial products, processes, services service mark, trademark, manufacturer, otherwise, constitute imply endorsement, recommendation favoring Department Commerce. Department Commerce seal logo, seal logo DOC bureau, shall used manner imply endorsement commercial product activity DOC United States Government.”","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":null,"dir":"Reference","previous_headings":"","what":"Francis Weighting for compositional data — SScompsTA1.8","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"TA1.8 Francis function modified r4ss::SSMethod.TA1.8 r4ss::SSMethod.Cond.TA1.8 apply Francis weighting method TA1.8 length-, age-, generalized size-composition data, conditional age--length data Stock Synthesis model. conditional age--length data, mean age year calculated based recommendations Punt (2015). main purpose create dataframe annual observed expected mean length age fleet used calculate residuals testing model fit. function used SSplotRunstest SSplotJABBAres.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"","code":"SScompsTA1.8( ss3rep, type = c(\"len\", \"age\", \"size\", \"con\"), fleet = NULL, seas = NULL, plotit = FALSE, maxpanel = 1000 )"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"ss3rep Stock Synthesis output read r4SS function SS_output type string either 'len' (length composition data), 'size' (generalized size composition data), 'age' (age composition data), 'con' (conditional age length data) fleet vector one fleet numbers whose data analysed simultaneously, NULL, fleets analysed seas string indicating treat data multiple seasons 'comb' - combine seasonal data year plot Yr 'sep' - treat season separately, plotting Yr.S. .null(seas), assumed one season option 'comb' used. plotit TRUE, make illustrative plot like one panels Fig. 4 Francis (2011). maxpanel maximum number panels within plot, default 1000","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"ss_out data.frame observed, predicted mean length/age 95% confidence intervals based stage 1 stage 2 weighting runs_dat data.frame observed predicted mean length age year/fleet.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"Francis, R..C.C. (2011). Data weighting statistical fisheries stock assessment models. Canadian Journal Fisheries Aquatic Sciences 68: 1124-1138. #' Punt, .E. (2015). insights data weighting integrated stock assessments. Fish. Res. 0.05 (residuals random) failed p-value < 0.5 (residuals random)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSplotRunstest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Residual Diagnostics — SSplotRunstest","text":"Henning Winker (JRC-EC) Laurance Kell (Sea++)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":null,"dir":"Reference","previous_headings":"","what":"Read SS MCMC — SSreadMCMC","title":"Read SS MCMC — SSreadMCMC","text":"function read mcmc file outputs Stock Synthesis model","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read SS MCMC — SSreadMCMC","text":"","code":"SSreadMCMC(mcmcdir)"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read SS MCMC — SSreadMCMC","text":"mcmcdir file path folder derived_posteriors.sso file","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read SS MCMC — SSreadMCMC","text":"Stock Synthesis mcmc output file","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read SS MCMC — SSreadMCMC","text":"Henning Winker (JRC-EC) & Laurence Kell (Sea++)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve Composition Data from Multiple SS Models — SSretroComps","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"Wrapper get observed expected mean length/age multiple Stock Synthesis models.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"","code":"SSretroComps(retroModels)"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"retroModels object list replists r4ss::SSgetoutput()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"list observed expected mean Length/age comps (c.f. ss3rep[[\"cpue\"]])","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"Henning Winker","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrmse.html","id":null,"dir":"Reference","previous_headings":"","what":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","title":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","text":"Function calculating RMSE used SSplotJABBAres()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrmse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","text":"","code":"SSrmse( ss3rep, quants = c(\"cpue\", \"len\", \"age\", \"con\"), seas = NULL, indexselect = NULL )"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrmse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","text":"ss3rep output SS_output() quants dataset calculate RMSE . \"cpue\" index abundance, \"len\" length comp, \"age\" age composition, \"con\" conditional age--length. seas string indicating treat data multiple seasons 'comb' - combine seasonal data year plot Yr 'sep' - treat season separately, plotting Yr.S. .null(seas), assumed one season option 'comb' used. indexselect Vector fleet numbers model compare","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrmse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","text":"returns list includes RMSE table output (fleet combined) dataframe residuals can used creating SSplotJABBAres() plot","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":null,"dir":"Reference","previous_headings":"","what":"Residual Diagnostics Plot — SSrunstest","title":"Residual Diagnostics Plot — SSrunstest","text":"Function residual diagnostics. Outputs runs test table gives runs test p-values, runs test passed (p-value > 0.05, residuals random) failed (p-value < 0.05, residuals random), 3x sigma limits indices mean age length type input data (cpue, length comp, age comp, size comp, conditional age--length).","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Residual Diagnostics Plot — SSrunstest","text":"","code":"SSrunstest( ss3rep = ss3diags::simple, mixing = \"less\", quants = c(\"cpue\", \"len\", \"age\", \"con\")[1], indexselect = NULL, verbose = TRUE )"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Residual Diagnostics Plot — SSrunstest","text":"ss3rep Stock Synthesis output read r4SS function SS_output mixing c(\"less\",\"greater\",\"two.sided\"). Default less checking positive autocorrelation quants optional use c(\"cpue\",\"len\",\"age\",\"con\"), default uses CPUE. indexselect Vector fleet numbers model compare verbose Report progress R GUI?","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Residual Diagnostics Plot — SSrunstest","text":"dataframe runs test p-value, test passed failed, 3x sigma high low limits, type data used. Rows fleet. Note, runs test passed p-value > 0.05 (residuals random) failed p-value < 0.5 (residuals random)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Residual Diagnostics Plot — SSrunstest","text":"Henning Winker (JRC-EC) Laurance Kell (Sea++)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Stock Status Settings — SSsettingsBratioF","title":"Get Stock Status Settings — SSsettingsBratioF","text":"function get Bratio F settings","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Stock Status Settings — SSsettingsBratioF","text":"","code":"SSsettingsBratioF(ss3rep, status = c(\"Bratio\", \"F\"), verbose = TRUE)"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Stock Status Settings — SSsettingsBratioF","text":"ss3rep r4ss::SSgetoutput() status covarying stock status quantaties extract Hessian verbose Report progress R GUI?","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Stock Status Settings — SSsettingsBratioF","text":"output list Bratio F settings","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Stock Status Settings — SSsettingsBratioF","text":"Henning Winker (JRC-EC)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ensemble_plot_index.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Indices — ensemble_plot_index","title":"Plot Indices — ensemble_plot_index","text":"function plot different fits single index abundance","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ensemble_plot_index.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Indices — ensemble_plot_index","text":"","code":"ensemble_plot_index( summaryoutput, varlist, indexfleets = 1, verbose = TRUE, legendloc = \"topright\", legendcex = 1, legendsp = 0.9, legendncol = 1, type = \"l\" )"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ensemble_plot_index.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Indices — ensemble_plot_index","text":"summaryoutput summaryoutput varlist variable list indexfleets Fleet vector index verbose Option output messages Rconsole legendloc Location legend. Either string like \"topleft\" vector two numeric values representing fraction maximum x y dimensions, respectively. See ?legend info string options. legendcex Allows adjust legend cex legendsp Space legend labels legendncol Number columns legend. type Type parameter passed points (default 'o' overplots points top lines)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":null,"dir":"Reference","previous_headings":"","what":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"MCMC output read SSgetMCMC()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"","code":"mcmcSimple"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"Large dataframe MCMC parameter estimates nrow = number values ncol = number parameters mcmcSimple mcmcSimple","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"MCMC evaluated Stock Synthesis","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"R. Methot,","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"Stock Synthesis output read SS_output()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"","code":"retroSimple"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"Large list 184 objects generated using r4ss Data_File Data_File Control_File Control_File definitions definitions fleet_ID fleet_ID fleet_type fleet_type fleet_timing fleet_timing fleet_area fleet_area catch_units catch_units catch_se catch_se equ_catch_se equ_catch_se survey_units survey_units survey_error survey_error IsFishFleet IsFishFleet nfishfleets nfishfleets nfleets nfleets nsexes nsexes ngpatterns ngpatterns lbins lbins Lbin_method Lbin_method nlbins nlbins lbinspop lbinspop nlbinspop nlbinspop sizebinlist sizebinlist agebins agebins nagebins nagebins accuage accuage nareas nareas startyr startyr endyr endyr nseasons nseasons seasfracs seasfracs seasdurations seasdurations N_sub_seasons N_sub_seasons Spawn_month Spawn_month Spawn_seas Spawn_seas Spawn_timing_in_season Spawn_timing_in_season Retro_year Retro_year N_forecast_yrs N_forecast_yrs Empirical_wt_at_age Empirical_wt_at_age N_bio_patterns N_bio_patterns N_platoons N_platoons NatMort_option NatMort_option GrowthModel_option GrowthModel_option Maturity_option Maturity_option Fecundity_option Fecundity_option Start_from_par Start_from_par Do_all_priors Do_all_priors Use_softbound Use_softbound N_nudata N_nudata Max_phase Max_phase Current_phase Current_phase Jitter Jitter ALK_tolerance ALK_tolerance nforecastyears nforecastyears morph_indexing morph_indexing MGparmAdj MGparmAdj forecast_selectivity forecast_selectivity SelSizeAdj SelSizeAdj SelAgeAdj SelAgeAdj recruitment_dist recruitment_dist recruit recruit SPAWN_RECR_CURVE SPAWN_RECR_CURVE breakpoints_for_bias_adjustment_ramp breakpoints_for_bias_adjustment_ramp SpawnOutputUnits SpawnOutputUnits biology biology FecType FecType FecPar1name FecPar1name FecPar2name FecPar2name FecPar1 FecPar1 FecPar2 FecPar2 M_type M_type Natural_Mortality_Bmark Natural_Mortality_Bmark Natural_Mortality_endyr Natural_Mortality_endyr Growth_Parameters Growth_Parameters growthCVtype growthCVtype endgrowth endgrowth wtatage_switch wtatage_switch mean_body_wt mean_body_wt growthseries growthseries growthvaries growthvaries sizeselex sizeselex ageselex ageselex F_method F_method exploitation exploitation catch catch summary_age summary_age timeseries timeseries spawnseas spawnseas mainmorphs mainmorphs birthseas birthseas depletion_method depletion_method depletion_basis depletion_basis discard discard discard_type discard_type DF_discard DF_discard discard_spec discard_spec mnwgt mnwgt DF_mnwgt DF_mnwgt sprseries sprseries managementratiolabels managementratiolabels F_report_basis F_report_basis B_ratio_denominator B_ratio_denominator sprtarg sprtarg btarg btarg minbthresh minbthresh Kobe_warn Kobe_warn Kobe_MSY_basis Kobe_MSY_basis Kobe Kobe index_variance_tuning_check index_variance_tuning_check cpue cpue natage natage natage_annual_1_no_fishery natage_annual_1_no_fishery natage_annual_2_with_fishery natage_annual_2_with_fishery batage batage natlen natlen batlen batlen fatage fatage discard_at_age discard_at_age catage catage movement movement ALK ALK N_ageerror_defs N_ageerror_defs equil_yield equil_yield Z_at_age Z_at_age M_at_age M_at_age Dynamic_Bzero Dynamic_Bzero comp_data_exists comp_data_exists lendbase lendbase sizedbase sizedbase agedbase agedbase condbase condbase ghostagedbase ghostagedbase ghostcondbase ghostcondbase ghostlendbase ghostlendbase ladbase ladbase wadbase wadbase tagdbase1 tagdbase1 tagdbase2 tagdbase2 len_comp_fit_table len_comp_fit_table size_comp_fit_table size_comp_fit_table derived_quants derived_quants parameters parameters FleetNames FleetNames repfiletime repfiletime SRRtype SRRtype Pstar_sigma Pstar_sigma OFL_sigma OFL_sigma CoVar CoVar highcor highcor lowcor lowcor corstats corstats stdtable stdtable recruitpars recruitpars RecrDistpars RecrDistpars wtatage wtatage jitter_info jitter_info SS_version SS_version SS_versionshort SS_versionshort SS_versionNumeric SS_versionNumeric StartTime StartTime RunTime RunTime Files_used Files_used Nwarnings Nwarnings warnings warnings likelihoods_used likelihoods_used likelihoods_laplace likelihoods_laplace likelihoods_by_fleet likelihoods_by_fleet N_estimated_parameters N_estimated_parameters table_of_phases table_of_phases estimated_non_dev_parameters estimated_non_dev_parameters log_det_hessian log_det_hessian maximum_gradient_component maximum_gradient_component parameters_with_highest_gradients parameters_with_highest_gradients Length_Comp_Fit_Summary Length_Comp_Fit_Summary Age_Comp_Fit_Summary Age_Comp_Fit_Summary SBzero SBzero current_depletion current_depletion last_years_SPR last_years_SPR SPRratioLabel SPRratioLabel sigma_R_in sigma_R_in sigma_R_info sigma_R_info rmse_table rmse_table logfile logfile inputs inputs","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"simulated ss3sim","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"R. Methot","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":null,"dir":"Reference","previous_headings":"","what":"A simulated Simple Stock Synthesis model for a ","title":"A simulated Simple Stock Synthesis model for a ","text":"Stock Synthesis output read SS_output()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A simulated Simple Stock Synthesis model for a ","text":"","code":"simple"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A simulated Simple Stock Synthesis model for a ","text":"Large list 184 objects generated using r4ss Data_File Data_File Control_File Control_File definitions definitions fleet_ID fleet_ID fleet_type fleet_type fleet_timing fleet_timing fleet_area fleet_area catch_units catch_units catch_se catch_se equ_catch_se equ_catch_se survey_units survey_units survey_error survey_error IsFishFleet IsFishFleet nfishfleets nfishfleets nfleets nfleets nsexes nsexes ngpatterns ngpatterns lbins lbins Lbin_method Lbin_method nlbins nlbins lbinspop lbinspop nlbinspop nlbinspop sizebinlist sizebinlist agebins agebins nagebins nagebins accuage accuage nareas nareas startyr startyr endyr endyr nseasons nseasons seasfracs seasfracs seasdurations seasdurations N_sub_seasons N_sub_seasons Spawn_month Spawn_month Spawn_seas Spawn_seas Spawn_timing_in_season Spawn_timing_in_season Retro_year Retro_year N_forecast_yrs N_forecast_yrs Empirical_wt_at_age Empirical_wt_at_age N_bio_patterns N_bio_patterns N_platoons N_platoons NatMort_option NatMort_option GrowthModel_option GrowthModel_option Maturity_option Maturity_option Fecundity_option Fecundity_option Start_from_par Start_from_par Do_all_priors Do_all_priors Use_softbound Use_softbound N_nudata N_nudata Max_phase Max_phase Current_phase Current_phase Jitter Jitter ALK_tolerance ALK_tolerance nforecastyears nforecastyears morph_indexing morph_indexing MGparmAdj MGparmAdj forecast_selectivity forecast_selectivity SelSizeAdj SelSizeAdj SelAgeAdj SelAgeAdj recruitment_dist recruitment_dist recruit recruit SPAWN_RECR_CURVE SPAWN_RECR_CURVE breakpoints_for_bias_adjustment_ramp breakpoints_for_bias_adjustment_ramp SpawnOutputUnits SpawnOutputUnits biology biology FecType FecType FecPar1name FecPar1name FecPar2name FecPar2name FecPar1 FecPar1 FecPar2 FecPar2 M_type M_type Natural_Mortality_Bmark Natural_Mortality_Bmark Natural_Mortality_endyr Natural_Mortality_endyr Growth_Parameters Growth_Parameters growthCVtype growthCVtype endgrowth endgrowth wtatage_switch wtatage_switch mean_body_wt mean_body_wt growthseries growthseries growthvaries growthvaries sizeselex sizeselex ageselex ageselex F_method F_method exploitation exploitation catch catch summary_age summary_age timeseries timeseries spawnseas spawnseas mainmorphs mainmorphs birthseas birthseas depletion_method depletion_method depletion_basis depletion_basis discard discard discard_type discard_type DF_discard DF_discard discard_spec discard_spec mnwgt mnwgt DF_mnwgt DF_mnwgt sprseries sprseries managementratiolabels managementratiolabels F_report_basis F_report_basis B_ratio_denominator B_ratio_denominator sprtarg sprtarg btarg btarg minbthresh minbthresh Kobe_warn Kobe_warn Kobe_MSY_basis Kobe_MSY_basis Kobe Kobe index_variance_tuning_check index_variance_tuning_check cpue cpue natage natage natage_annual_1_no_fishery natage_annual_1_no_fishery natage_annual_2_with_fishery natage_annual_2_with_fishery batage batage natlen natlen batlen batlen fatage fatage discard_at_age discard_at_age catage catage movement movement ALK ALK N_ageerror_defs N_ageerror_defs equil_yield equil_yield Z_at_age Z_at_age M_at_age M_at_age Dynamic_Bzero Dynamic_Bzero comp_data_exists comp_data_exists lendbase lendbase sizedbase sizedbase agedbase agedbase condbase condbase ghostagedbase ghostagedbase ghostcondbase ghostcondbase ghostlendbase ghostlendbase ladbase ladbase wadbase wadbase tagdbase1 tagdbase1 tagdbase2 tagdbase2 len_comp_fit_table len_comp_fit_table size_comp_fit_table size_comp_fit_table derived_quants derived_quants parameters parameters FleetNames FleetNames repfiletime repfiletime SRRtype SRRtype Pstar_sigma Pstar_sigma OFL_sigma OFL_sigma CoVar CoVar highcor highcor lowcor lowcor corstats corstats stdtable stdtable recruitpars recruitpars RecrDistpars RecrDistpars wtatage wtatage jitter_info jitter_info SS_version SS_version SS_versionshort SS_versionshort SS_versionNumeric SS_versionNumeric StartTime StartTime RunTime RunTime Files_used Files_used Nwarnings Nwarnings warnings warnings likelihoods_used likelihoods_used likelihoods_laplace likelihoods_laplace likelihoods_by_fleet likelihoods_by_fleet N_estimated_parameters N_estimated_parameters table_of_phases table_of_phases estimated_non_dev_parameters estimated_non_dev_parameters log_det_hessian log_det_hessian maximum_gradient_component maximum_gradient_component parameters_with_highest_gradients parameters_with_highest_gradients Length_Comp_Fit_Summary Length_Comp_Fit_Summary Age_Comp_Fit_Summary Age_Comp_Fit_Summary SBzero SBzero current_depletion current_depletion last_years_SPR last_years_SPR SPRratioLabel SPRratioLabel sigma_R_in sigma_R_in sigma_R_info sigma_R_info rmse_table rmse_table logfile logfile inputs inputs","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A simulated Simple Stock Synthesis model for a ","text":"simulated ss3sim","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A simulated Simple Stock Synthesis model for a ","text":"R. Methot,","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":null,"dir":"Reference","previous_headings":"","what":"Runs Test for Residuals — ssruns_sig3","title":"Runs Test for Residuals — ssruns_sig3","text":"function uses randtests::runs.test perform runs test residuals determine randomly distributed. also calculates 3 x sigma limits","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Runs Test for Residuals — ssruns_sig3","text":"","code":"ssruns_sig3(x, type = NULL, mixing = \"less\")"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Runs Test for Residuals — ssruns_sig3","text":"x residuals CPUE fits type c(\"resid\",\"observations\") mixing c(\"less\",\"greater\",\"two.sided\"). Default less checking positive autocorrelation ","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Runs Test for Residuals — ssruns_sig3","text":"runs p value 3 x sigma limits","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Runs Test for Residuals — ssruns_sig3","text":"runs test conducted library(randtests)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Runs Test for Residuals — ssruns_sig3","text":"Henning Winker (JRC-EC) Laurence Kell (Sea++)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-210","dir":"Changelog","previous_headings":"","what":"ss3diags 2.1.0","title":"ss3diags 2.1.0","text":"RMSE calculations modularized standalone function can called independently SSplotJABBAres() SSrmse(). (#50) Bugfixes adjusting y-axis limits SSplotRunstest SSplotJABBAres: Use ylim parameter adjust y-axis limits. (#46) Added option remove median trajectory SSplotKobe() (#3) Added rlang, dplyr, magrittr dependencies. SSmase SSplotHcxval: Corrected validation messsage clarify validation issue fix issue code styler. (#33, #35) Added Date field DESCRIPTION. DESCRIPTION metadata now used generate package citations. (#25) Package vingettes formatted html_vignette reduce file size. Removed redundant PDF word document versions ss3diags_Handbook vignette. Enabled markdown support roxygen. Enabled Cross-reference links.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-203","dir":"Changelog","previous_headings":"","what":"ss3diags 2.0.3","title":"ss3diags 2.0.3","text":"Changed r4ss dependency 1.44.0 (CRAN version) . Replaced default R CMD CHECK workflow NOAA-fish-tools/ghactions4r’s version. Fixed Ensemble Quantile Shading Issues (#4) Replaced example datasets ss3diags cookbook, handbook current “simple” ensemble model. Fixup minor code documentation formatting issues. SSmase SSplotHcxval: Fixed code styler’s dollar subset conversion issues. example:`message(‘x$name 1,2,3,4’)`","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-202","dir":"Changelog","previous_headings":"","what":"ss3diags 2.0.2","title":"ss3diags 2.0.2","text":"Changed r4ss CRAN version (1.36.1) dependency development version legendfun -> r4ss::add_legend pngfun -> r4ss::save_png rc -> r4ss::rich_colors_short sspar -> r4ss::sspar Fix SSplotRetro.R indention causing issues code styler","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-201","dir":"Changelog","previous_headings":"","what":"ss3diags 2.0.1","title":"ss3diags 2.0.1","text":"Change SSplotJABBAres show combined seasonal data boxplots Fixup links Cookbook sripts. Formatted DESCRIPTION URL BugReports links PIFSCstockassessments repo add R package site.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-200","dir":"Changelog","previous_headings":"","what":"ss3diags 2.0.0","title":"ss3diags 2.0.0","text":"simple, cod-like, Stock Synthesis model, simulated via ss3sim, replaces Pacific North Hake (pac.hke) North Atlantic Shortfin Mako Shark (natl.sma) example datasets. SSplotRetro: fixed bug shading uncertainty area shows xlims specified. SSplotJABBAres: added ‘con’ option subplots argument conditional age--length data can plotted. Also added seas argument user can specify data combined across seasons within year kept separate. SScompsTA1.8: added seas argument users can specify data combined across seasons within year kept separate. SSplot functions (SSplotModelComp, SSplotEnsemble, SSplotHCxval, SSplotJABBAres, SSplotRetro): Marked plot, png, pdf, print, new deprecated. defunct future version. Added NEWS.md file track changes package.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-108","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.8","title":"ss3diags 1.0.8","text":"Fixed MASE","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-107","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.7","title":"ss3diags 1.0.7","text":"Bug fixes","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-106","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.6","title":"ss3diags 1.0.6","text":"Improved SSdiagsMCMC","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-105","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.5","title":"ss3diags 1.0.5","text":"Updated SSdeltaMVLN","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-104","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.4","title":"ss3diags 1.0.4","text":"Reference: authors changes","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-103","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.3","title":"ss3diags 1.0.3","text":"Added annF_ quantaties","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-102","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.2","title":"ss3diags 1.0.2","text":"Added aut","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-101","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.1","title":"ss3diags 1.0.1","text":"Added SSplotH","code":""}] +[{"path":"https://pifscstockassessments.github.io/ss3diags/CODE_OF_CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Code of Conduct","title":"Code of Conduct","text":"follow NFMS Fisheries Toolbox Code Conduct. NFMS Fisheries Toolbox Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html answers common questions code conduct, see https://www.contributor-covenant.org/faq","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to ss3diags","title":"Contributing to ss3diags","text":"Thank interest contributing! strive follow NMFS Fisheries Toolbox Contribution Guide. Note guidelines, rules, open collaborations ways may work better . Please feel free reach us opening issue repository emailing project maintatainer megumi.oshima@noaa.gov. project everyone participating governed NMFS Fisheries Toolbox Code Conduct. participating, expected uphold code. Please report unacceptable behavior fisheries.toolbox@noaa.gov. Note maintainers ss3diags access email account, unacceptable behavior maintainers can also reported .","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Jitter.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"Jitter Analysis","text":"run stock synthesis model, 4 input files required: starter, forecast, control, data. input files example model can found within ss3diags package accessed shown . Also, r4ss installed, need install tutorial. need make sure SS executable file either path directory running retrospective (case dir_jitter). easy way get latest release stock synthesis use r4ss function get_ss3_exe(). run model dir_jitter first produce necessary output files. recommended jitter runs subdirectory model run. keep output files separate diagnostic tests may run.","code":"install_github(\"r4ss/r4ss\") library(r4ss) files_path <- system.file(\"extdata\", package = \"ss3diags\") dir_jitter <- file.path(tempdir(check = TRUE), \"jitter\") dir.create(dir_jitter, showWarnings = FALSE, recursive = TRUE) list.files(files_path) #> [1] \"control.ss\" \"data.ss\" \"forecast.ss\" \"starter.ss\" file.copy(from = list.files(files_path, full.names = TRUE), to = dir_jitter) #> [1] TRUE TRUE TRUE TRUE r4ss::get_ss3_exe(dir = dir_jitter, version = \"v3.30.21\") #> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/Rtmpkuz5f4/jitter/ss3 r4ss::run(dir = dir_jitter, exe = \"ss3\", verbose = FALSE) #> [1] \"ran model\""},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Jitter.html","id":"jitter","dir":"Articles","previous_headings":"","what":"Jitter","title":"Jitter Analysis","text":"example, run 50 jitters. jitter() function automates entire process need give arguments run produce total likelihoods run. analyze output 50 runs, use r4ss::SSgetoutput() r4ss::SSsummarize() shown . key sections may want check compare across models , likelihoods, derived quantities, estimated parameters. may also want check models converged. can check maximum gradients make sure small (< 0.0001). can also compare estimated spawning biomass, extreme values (+2x <0.5x base spawning biomass) suggests model didn’t converge.","code":"Njitter <- 50 jit.likes <- r4ss::jitter(dir = dir_jitter, Njitter = Njitter, init_values_src = 1, jitter_fraction = 0.1, exe = \"ss3\", printlikes = FALSE, verbose = FALSE) jit_mods <- SSgetoutput(keyvec = c(\"\",1:Njitter), #\"\" to include reference run (Report.sso) getcomp = FALSE, dirvec = dir_jitter, getcovar = FALSE, verbose = FALSE) jit_summary <- SSsummarize(jit_mods, verbose = FALSE) head(jit_summary$likelihoods) #> replist replist1 replist2 replist3 replist4 replist5 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33480e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> replist6 replist7 replist8 replist9 replist10 replist11 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> replist12 replist13 replist14 replist15 replist16 replist17 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74853e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> replist18 replist19 replist20 replist21 replist22 replist23 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> replist24 replist25 replist26 replist27 replist28 replist29 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> replist30 replist31 replist32 replist33 replist34 replist35 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> replist36 replist37 replist38 replist39 replist40 replist41 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> replist42 replist43 replist44 replist45 replist46 replist47 #> 1 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 7.54302e+02 #> 2 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 1.33479e-10 #> 3 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 1.74852e-01 #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 -7.11813e+00 #> 5 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 3.66756e+02 #> 6 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 2.31845e+02 #> replist48 replist49 replist50 Label #> 1 7.54302e+02 7.54302e+02 7.54302e+02 TOTAL #> 2 1.33479e-10 1.33479e-10 1.33479e-10 Catch #> 3 1.74852e-01 1.74852e-01 1.74852e-01 Equil_catch #> 4 -7.11813e+00 -7.11813e+00 -7.11813e+00 Survey #> 5 3.66756e+02 3.66756e+02 3.66756e+02 Length_comp #> 6 2.31845e+02 2.31845e+02 2.31845e+02 Age_comp head(jit_summary$quants) #> replist replist1 replist2 replist3 replist4 replist5 replist6 replist7 #> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 #> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 #> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 #> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 #> replist8 replist9 replist10 replist11 replist12 replist13 replist14 replist15 #> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 #> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 #> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 #> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 #> replist16 replist17 replist18 replist19 replist20 replist21 replist22 #> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 #> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 #> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 #> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 #> replist23 replist24 replist25 replist26 replist27 replist28 replist29 #> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 #> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 #> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 #> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 #> replist30 replist31 replist32 replist33 replist34 replist35 replist36 #> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 #> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 #> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 #> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 #> replist37 replist38 replist39 replist40 replist41 replist42 replist43 #> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 #> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 #> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 #> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 #> replist44 replist45 replist46 replist47 replist48 replist49 replist50 #> 1 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 54773.8 #> 2 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 3 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 26071.4 #> 4 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 24096.1 #> 5 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 22126.1 #> 6 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 20143.5 #> Label Yr #> 1 SSB_Virgin NA #> 2 SSB_Initial NA #> 3 SSB_2011 2011 #> 4 SSB_2012 2012 #> 5 SSB_2013 2013 #> 6 SSB_2014 2014 head(jit_summary$pars) #> replist replist1 replist2 replist3 replist4 replist5 replist6 #> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 #> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 #> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 #> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> replist7 replist8 replist9 replist10 replist11 replist12 replist13 #> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 #> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 #> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 #> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> replist14 replist15 replist16 replist17 replist18 replist19 replist20 #> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 #> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 #> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 #> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> replist21 replist22 replist23 replist24 replist25 replist26 replist27 #> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 #> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 #> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 #> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> replist28 replist29 replist30 replist31 replist32 replist33 replist34 #> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 #> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 #> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 #> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> replist35 replist36 replist37 replist38 replist39 replist40 replist41 #> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 #> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 #> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 #> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> replist42 replist43 replist44 replist45 replist46 replist47 replist48 #> 1 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 2 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 22.769000 #> 3 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 71.807200 #> 4 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 0.142165 #> 5 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> 6 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 0.100000 #> replist49 replist50 Label Yr recdev #> 1 0.100000 0.100000 NatM_uniform_Fem_GP_1 NA FALSE #> 2 22.769000 22.769000 L_at_Amin_Fem_GP_1 NA FALSE #> 3 71.807200 71.807200 L_at_Amax_Fem_GP_1 NA FALSE #> 4 0.142165 0.142165 VonBert_K_Fem_GP_1 NA FALSE #> 5 0.100000 0.100000 CV_young_Fem_GP_1 NA FALSE #> 6 0.100000 0.100000 CV_old_Fem_GP_1 NA FALSE # Maximum gradient converged_grad <- which(jit_summary$maxgrad < 0.0001) converged_ssb <- jit_summary$SpawnBio %>% mutate(across(c(1:(Njitter+1)), .fns = ~./replist)) %>% # for each column, divide SSB by SSB from the reference run (replist0) select(-Label) %>% pivot_longer(col = c(1:(Njitter+1)), names_to = \"jitter\", values_to = \"SSB\") %>% pivot_wider(names_from = Yr, values_from = SSB) %>% mutate(rownumber = seq(1, nrow(.))) %>% tibble::column_to_rownames(\"jitter\") %>% filter_at(vars(1:(ncol(.)-1)), all_vars((.) < 2 & (.) > 0.5)) %>% #keep only select(rownumber) %>% pull(rownumber) converged_mods <- intersect(converged_grad, converged_ssb) #getting which models are in both groups converged_jitters <- jit_mods[converged_grad] converged_sum <- SSsummarize(converged_jitters, verbose = FALSE)"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Jitter.html","id":"visualizing-output","dir":"Articles","previous_headings":"","what":"Visualizing Output","title":"Jitter Analysis","text":"compare likelihoods runs, plot shown . built functions (writing recipe) r4ss ss3diags generate likelihood plot, therefore provide code tidyverse syntax (using ggplot2) visualize results. figure plots Total likelihood jitter run red line indicates total likelihood value reference run. runs points red line, use parameter values run lowest likelihood value. can also use r4ss::SSplotComparisons() compare spawning biomass trajectories jitter runs see impact different parameter values estimated quantities.","code":"converged_sum$likelihoods %>% filter(str_detect(Label, \"TOTAL\")) %>% select(-Label) %>% pivot_longer(cols = everything(), names_to = \"jitter\", values_to = \"likelihood\") %>% separate(jitter, into = c(\"replist\", \"jitter\"), sep = \"(?<=[A-Za-z])(?=[0-9])\") %>% mutate(jitter = as.numeric(jitter)) %>% ggplot(aes(x = jitter, y = likelihood)) + geom_point(size = 3) + geom_hline(aes(yintercept = likelihood[1]), color = \"red\") + theme_classic() + labs(y = \"Total Likelihood\", x = \"Jitter runs at a converged solution\") #> Warning: Expected 2 pieces. Missing pieces filled with `NA` in 1 rows #> [1]. #> Warning: Removed 1 rows containing missing values (`geom_point()`). SSplotComparisons(converged_sum, subplots = 2, ylimAdj=1) #> showing uncertainty for all models #> subplot 2: spawning biomass with uncertainty intervals"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"Retrospective Analysis","text":"run stock synthesis model, 4 input files required: starter, forecast, control, data. input files example model can found within ss3diags package accessed shown . Also, r4ss installed, need install tutorial. need make sure SS executable file either path directory running retrospective (case dir_retro). easy way get latest release stock synthesis use r4ss function get_ss3_exe().","code":"install.packages(\"pak\") pak::pkg_install(\"r4ss/r4ss\") library(r4ss) files_path <- system.file(\"extdata\", package = \"ss3diags\") dir_retro <- file.path(tempdir(check = TRUE), \"retrospectives\") dir.create(dir_retro, showWarnings = FALSE) list.files(files_path) #> [1] \"control.ss\" \"data.ss\" \"forecast.ss\" \"starter.ss\" file.copy(from = list.files(files_path, full.names = TRUE), to = dir_retro) #> [1] TRUE TRUE TRUE TRUE r4ss::get_ss3_exe(dir = dir_retro, version = \"v3.30.21\") #> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpAaZIvr/retrospectives/ss3"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"retrospective-analysis","dir":"Articles","previous_headings":"","what":"Retrospective Analysis","title":"Retrospective Analysis","text":"4 input files SS executable, can run retrospective analysis shown . running 5 1-year peels, run, last year data removed model re-run total 5 times. number year peels can adjusted years argument. SS executable file using named something “ss” (e.g. ss_opt_win.exe), need specify argument exe = \"ss_opt_win\".","code":"r4ss::retro(dir = dir_retro, exe = \"ss3\", years = 0:-5, verbose = FALSE) #> Warning in base::sink(type = \"output\", split = FALSE): no sink to remove"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"visualizing-output","dir":"Articles","previous_headings":"","what":"Visualizing Output","title":"Retrospective Analysis","text":"visualize output inspect patterns biases, need load report files R can use SSplotRetro() function ss3diags. easiest way load multiple report files using r4ss::SSgetoutput() r4ss::SSsummarize() functions. default sub-directories peel, 0 5, labeled retro0 retro-5. default settings plot spawning stock biomass time series peel, reference run (e.g. model years removed) “Ref” line successive peel colored lines labeled end year. solid line ends end year dashed line point shows 1 year forecast. Displaying projected SSB can help assess forecast bias. Note, forecasts done automatically using r4ss::retro() based settings forecast.ss. grey shaded area represents 95% confidence intervals uncertainty around spawning biomass time series. Displayed center plot combined Mohn’s \\(\\rho\\) retrospective runs, parentheses forecast Mohn’s \\(\\rho\\).","code":"retro_mods <- r4ss::SSgetoutput(dirvec = file.path(dir_retro, \"retrospectives\", paste0(\"retro\", seq(0,-5,by=-1))), verbose = F) retroSummary <- r4ss::SSsummarize(retro_mods, verbose = F) SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE) #> Mohn's Rho stats, including one step ahead forecasts: #> type peel Rho ForecastRho #> 1 SSB 2021 -0.20753686 -0.221050163 #> 2 SSB 2020 -0.19601072 -0.227304734 #> 3 SSB 2019 -0.29238505 -0.338600758 #> 4 SSB 2018 -0.00474920 -0.007462034 #> 5 SSB 2017 0.08716428 0.098849082 #> 6 SSB Combined -0.12270351 -0.139113722"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"customizing-the-plot","dir":"Articles","previous_headings":"Visualizing Output","what":"Customizing the Plot","title":"Retrospective Analysis","text":"Retro plots can customized many ways, common features may want specify : removing uncertainty intervals adjusting years shown x-axis turning 1-year ahead forecasting displaying combined \\(\\rho\\) value plot Examples changes shown , incrementally making adjustment. Additionally, fishing mortality can plotted instead spawning biomass replacing subplots = \"SSB\" subplots = \"F\"","code":"r4ss::sspar(mfrow = c(2, 2), plot.cex = 0.8) retro1 <- SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE, uncertainty = FALSE) #> Mohn's Rho stats, including one step ahead forecasts: retro2 <- SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE, uncertainty = FALSE, xlim = c(2015, 2022)) #> Mohn's Rho stats, including one step ahead forecasts: retro3 <- SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE, uncertainty = FALSE, xlim = c(2015, 2022), forecast = FALSE) #> Mohn's Rho stats, including one step ahead forecasts: retro4 <- SSplotRetro(retroSummary, subplots = \"SSB\", add = TRUE, uncertainty = FALSE, xlim = c(2015, 2022), forecast = FALSE, showrho = FALSE, forecastrho = FALSE) #> Mohn's Rho stats, including one step ahead forecasts:"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/Retrospective-Analysis.html","id":"summary-table","dir":"Articles","previous_headings":"Visualizing Output","what":"Summary Table","title":"Retrospective Analysis","text":"addition retrospective plots, summary statistics table can produced using SShcbias(). table includes type estimate (SSB F) year removed “peel” Mohn’s \\(\\rho\\) forecast bias year overall (“Combined”). Mohn’s \\(\\rho\\) measure severity bias retrospective patterns forecast bias estimate bias forecasted quantities years data removed. rule thumb proposed Hurtado-Ferror et al. (2014) Mohn’s \\(\\rho\\) values long-lived species, \\(\\rho\\) value fall -0.15 0.20.","code":"SShcbias(retroSummary) #> Mohn's Rho stats, including one step ahead forecasts: #> type peel Rho ForcastRho #> 1 SSB 2021 -0.20753686 -0.221050163 #> 2 SSB 2020 -0.19601072 -0.227304734 #> 3 SSB 2019 -0.29238505 -0.338600758 #> 4 SSB 2018 -0.00474920 -0.007462034 #> 5 SSB 2017 0.08716428 0.098849082 #> 6 SSB Combined -0.12270351 -0.139113722 #> 7 F 2021 0.28425747 0.285936183 #> 8 F 2020 0.30941305 0.349748774 #> 9 F 2019 0.52629045 0.632574831 #> 10 F 2018 0.01822898 0.022822958 #> 11 F 2017 -0.04896989 -0.053882358 #> 12 F Combined 0.21784401 0.247440078"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"ASPM","text":"run stock synthesis model, 4 input files required: starter, forecast, control, data. input files example model can found within ss3diags package accessed shown . Also, r4ss installed, need install tutorial. need make sure SS executable file either path directory running ASPM (case dir_aspm). easy way get latest release stock synthesis use r4ss function get_ss3_exe().","code":"install.packages(\"pak\") pak::pkg_install(\"r4ss/r4ss\") library(r4ss) files_path <- system.file(\"extdata\", package = \"ss3diags\") dir_tmp <- tempdir(check = TRUE) dir_aspm <- file.path(dir_tmp, \"aspm\") dir.create(dir_aspm, showWarnings = FALSE, recursive = TRUE) list.files(files_path) ## [1] \"control.ss\" \"data.ss\" \"forecast.ss\" \"starter.ss\" file.copy(from = list.files(files_path, full.names = TRUE), to = dir_tmp) ## [1] TRUE TRUE TRUE TRUE r4ss::get_ss3_exe(dir = dir_tmp, version = \"v3.30.21\") ## The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/Rtmpal5pLE/ss3"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"aspm","dir":"Articles","previous_headings":"","what":"ASPM","title":"ASPM","text":"4 input files, need determine components need turned run ASPM. ASPM depend index abundance catch data, composition data, recruitment deviations, etc. need turned . provide example includes multiple types data recruitment deviations, however, exact steps necessary individual model may vary depending complexity components included. Therefore steps may fully comprehensive model sure check components may need change. , show use r4ss functions make necessary changes control.ss ss.par files.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"generate-files","dir":"Articles","previous_headings":"ASPM","what":"Generate files","title":"ASPM","text":"order get ss.par file, need run model . also produce new data control file use input files. run model dir_tmp copy new files dir_aspm.","code":"r4ss::run(dir = dir_tmp, verbose = FALSE, exe = \"ss3\") ## [1] \"ran model\" files <- c(\"data_echo.ss_new\", \"control.ss_new\", \"starter.ss\", \"forecast.ss\", \"ss.par\", \"ss3\") file.copy(from = file.path(dir_tmp, files), to = dir_aspm) ## [1] TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"recruitment-deviations","dir":"Articles","previous_headings":"ASPM","what":"Recruitment Deviations","title":"ASPM","text":"Set recruitment devations ss.par 0.","code":"par <- SS_readpar_3.30(parfile = file.path(dir_aspm, \"ss.par\"), datsource = file.path(dir_aspm, \"data_echo.ss_new\"), ctlsource = file.path(dir_aspm, \"control.ss_new\"), verbose = FALSE) par$recdev1 ## year recdev ## [1,] 2011 -0.06005247 ## [2,] 2012 -0.01284866 ## [3,] 2013 0.13478706 ## [4,] 2014 0.11410144 ## [5,] 2015 -0.08325396 ## [6,] 2016 0.14556845 ## [7,] 2017 -0.12973978 ## [8,] 2018 -0.18308123 ## [9,] 2019 0.02442762 ## [10,] 2020 -0.08979813 ## [11,] 2021 -0.07812317 ## [12,] 2022 0.21801284 par$recdev_forecast ## year recdev ## [1,] 2023 0 ## [2,] 2024 0 ## [3,] 2025 0 ## [4,] 2026 0 ## [5,] 2027 0 ## [6,] 2028 0 ## [7,] 2029 0 ## [8,] 2030 0 ## [9,] 2031 0 ## [10,] 2032 0 par$recdev1[,\"recdev\"] <- 0 #Would run if forecasts recdevs were not already 0 #par$recdev_forecast[,\"recdev\"] <- 0 SS_writepar_3.30(parlist = par, outfile = file.path(dir_aspm, \"ss.par\"), overwrite = T, verbose = FALSE) ## $headerlines ## [1] \"# Number of parameters = 32 Objective function value = 754.301687441726 Maximum gradient component = 8.77017492766611e-07\" ## [2] \"# dummy_parm:\" ## [3] \"1.00000000000\" ## ## $MG_parms ## INIT ESTIM ## NatM_p_1_Fem_GP_1 0.10000000 0.10000000 ## L_at_Amin_Fem_GP_1 22.76900000 22.76899194 ## L_at_Amax_Fem_GP_1 71.80720000 71.80721125 ## VonBert_K_Fem_GP_1 0.14216500 0.14216482 ## CV_young_Fem_GP_1 0.10000000 0.10000000 ## CV_old_Fem_GP_1 0.10000000 0.10000000 ## Wtlen_1_Fem_GP_1 0.00000244 0.00000244 ## Wtlen_2_Fem_GP_1 3.34694000 3.34694000 ## Mat50%_Fem_GP_1 55.00000000 55.00000000 ## Mat_slope_Fem_GP_1 -0.25000000 -0.25000000 ## Eggs_alpha_Fem_GP_1 1.00000000 1.00000000 ## Eggs_beta_Fem_GP_1 0.00000000 0.00000000 ## NatM_p_1_Mal_GP_1 0.00000000 0.00000000 ## L_at_Amin_Mal_GP_1 0.00000000 0.00000000 ## L_at_Amax_Mal_GP_1 0.00000000 0.00000000 ## VonBert_K_Mal_GP_1 0.00000000 0.00000000 ## CV_young_Mal_GP_1 0.00000000 0.00000000 ## CV_old_Mal_GP_1 0.00000000 0.00000000 ## Wtlen_1_Mal_GP_1 0.00000244 0.00000244 ## Wtlen_2_Mal_GP_1 3.34694000 3.34694000 ## CohortGrowDev 1.00000000 1.00000000 ## FracFemale_GP_1 0.50000000 0.50000000 ## ## $SR_parms ## INIT ESTIM ## SR_LN(R0) 8.9274 8.927395 ## SR_BH_steep 0.8000 0.800000 ## SR_sigmaR 0.6000 0.600000 ## SR_regime 0.0000 0.000000 ## SR_autocorr 0.0000 0.000000 ## ## $recdev1 ## year recdev ## [1,] 2011 0 ## [2,] 2012 0 ## [3,] 2013 0 ## [4,] 2014 0 ## [5,] 2015 0 ## [6,] 2016 0 ## [7,] 2017 0 ## [8,] 2018 0 ## [9,] 2019 0 ## [10,] 2020 0 ## [11,] 2021 0 ## [12,] 2022 0 ## ## $recdev_forecast ## year recdev ## [1,] 2023 0 ## [2,] 2024 0 ## [3,] 2025 0 ## [4,] 2026 0 ## [5,] 2027 0 ## [6,] 2028 0 ## [7,] 2029 0 ## [8,] 2030 0 ## [9,] 2031 0 ## [10,] 2032 0 ## ## $init_F ## [1] 0.1 ## ## $Q_parms ## INIT ESTIM ## LnQ_base_SURVEY1(2) 0.476759 0.4767585 ## Q_extraSD_SURVEY1(2) 0.000000 0.0000000 ## LnQ_base_SURVEY2(3) -6.304070 -6.3040672 ## ## $S_parms ## INIT ESTIM ## SizeSel_P_1_FISHERY(1) 56.51380 56.513807 ## SizeSel_P_2_FISHERY(1) 20.17930 20.179340 ## SizeSel_P_1_SURVEY1(2) 36.02330 36.023325 ## SizeSel_P_2_SURVEY1(2) 5.33502 5.335021 ## AgeSel_P_1_SURVEY2(3) 0.00000 0.000000 ## AgeSel_P_2_SURVEY2(3) 0.00000 0.000000"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"starter-file","dir":"Articles","previous_headings":"ASPM","what":"Starter File","title":"ASPM","text":"Change starter file read ss.par (init_values_src = 1) use new data control files.","code":"starter <- SS_readstarter(file = file.path(dir_aspm, \"starter.ss\"), verbose = FALSE) starter$datfile <- \"data_echo.ss_new\" starter$ctlfile <- \"control.ss_new\" starter$init_values_src <- 1 SS_writestarter(starter, dir = dir_aspm, overwrite = TRUE, verbose = FALSE, warn = FALSE) ## Warning: The `warn` argument of `SS_writestarter()` is deprecated as of r4ss 1.45.0. ## This warning is displayed once every 8 hours. ## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was ## generated."},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"control-file","dir":"Articles","previous_headings":"ASPM","what":"Control File","title":"ASPM","text":"things control file may need changed, phases parameters : length selectivity age selectivity size selectivity steepness sigmaR recruitment deviations Additionally, likelihood components may need turned well. can using lambda options control file. examples include: length-composition data age-composition data size-composition data initial F","code":"control <- SS_readctl_3.30(file = file.path(dir_aspm, \"control.ss_new\"), datlist = file.path(dir_aspm, \"data_echo.ss_new\"), verbose = FALSE) control$SR_parms ## LO HI INIT PRIOR PR_SD PR_type PHASE env_var&link dev_link ## SR_LN(R0) 6.0 12 8.9274 10.3 10.0 0 1 0 0 ## SR_BH_steep 0.2 1 0.8000 0.8 1.0 0 -4 0 0 ## SR_sigmaR 0.0 2 0.6000 0.8 0.8 0 -4 0 0 ## SR_regime -5.0 5 0.0000 0.0 1.0 0 -4 0 0 ## SR_autocorr 0.0 0 0.0000 0.0 0.0 0 -99 0 0 ## dev_minyr dev_maxyr dev_PH Block Block_Fxn ## SR_LN(R0) 0 0 0 0 0 ## SR_BH_steep 0 0 0 0 0 ## SR_sigmaR 0 0 0 0 0 ## SR_regime 0 0 0 0 0 ## SR_autocorr 0 0 0 0 0 # Would need to run if PHASES were positive for \"steep\" and \"sigmaR\" #control$SR_parms[c(2,3),\"PHASE\"] <- c(-4,-4) control$age_selex_parms ## LO HI INIT PRIOR PR_SD PR_type PHASE env_var&link ## AgeSel_P_1_SURVEY2(3) 0 20 0 5 99 0 -99 0 ## AgeSel_P_2_SURVEY2(3) 0 20 0 6 99 0 -99 0 ## dev_link dev_minyr dev_maxyr dev_PH Block Block_Fxn ## AgeSel_P_1_SURVEY2(3) 0 0 0 0 0 0 ## AgeSel_P_2_SURVEY2(3) 0 0 0 0 0 0 #would need to run if PHASES were positive for age selectivity #control$age_selex_parms[,\"PHASE\"] <- control$age_selex_parms[,\"PHASE\"] * -1 control$size_selex_parms[,\"PHASE\"] <- control$size_selex_parms[,\"PHASE\"] * -1 control$recdev_early_phase <- -4 control$recdev_phase <- -2 new_lambdas <- data.frame(like_comp = c(4,4,5,5,7,7,9,9,9,10), fleet = c(1,2,1,2,1,2,1,2,3,1), phase = rep(1, 10), value = rep(0, 10), sizefreq_method = rep(1, 10)) new_lambdas ## like_comp fleet phase value sizefreq_method ## 1 4 1 1 0 1 ## 2 4 2 1 0 1 ## 3 5 1 1 0 1 ## 4 5 2 1 0 1 ## 5 7 1 1 0 1 ## 6 7 2 1 0 1 ## 7 9 1 1 0 1 ## 8 9 2 1 0 1 ## 9 9 3 1 0 1 ## 10 10 1 1 0 1 control$lambdas <- new_lambdas control$N_lambdas <- nrow(new_lambdas) SS_writectl_3.30(control, outfile = file.path(dir_aspm, \"control.ss_new\"), overwrite = TRUE, verbose = FALSE)"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"run-aspm","dir":"Articles","previous_headings":"ASPM","what":"Run ASPM","title":"ASPM","text":"","code":"r4ss::run(dir = dir_aspm, exe = \"ss3\", skipfinished = FALSE, verbose = FALSE) ## [1] \"ran model\""},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/aspm.html","id":"visualize-results","dir":"Articles","previous_headings":"ASPM","what":"Visualize Results","title":"ASPM","text":"","code":"mods <- SSgetoutput(dirvec = c( dir_tmp, dir_aspm ), verbose = FALSE) mods_sum <- SSsummarize(mods, verbose = FALSE) SSplotComparisons(mods_sum, legendlabels = c(\"Ref\", \"ASPM\"), subplots = c(2,8,14), new = F) ## showing uncertainty for all models ## subplot 2: spawning biomass with uncertainty intervals ## subplot 8: F value with uncertainty ## subplot 14: index fits on a log scale"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/hcxval.html","id":"visualizing-output","dir":"Articles","previous_headings":"","what":"Visualizing Output","title":"Hindcast Cross-Validation","text":"HCxval implemented using ss3diags::SSplotHCxval(), produces novel HCxval diagnostic plot computes MASE scores indices abundance, mean lengths, mean ages observations falling within hindcast evaluation period. Plotting HCxval abundance indices requires step summarizing list retrospective runs retrospective analysis, therefore needs done . example use retroSummary created . plots , see fleets, model fairly good prediction skill (compared random walk) index abundance data. plots, white points white dashed line observed data included model truncated time series. larger colored points observed data retrospective peel (.e. data removed peel). smaller colored point dashed line show model predicted value. “Ref” line model run complete time series data. grey shaded areas represent uncertainty data, darker portion indicating portion included model lighter portion indicating ones removed projected. MASE scores displayed MASE adjusted MASE parentheses.","code":"r4ss::sspar(mfrow = c(1,2)) SSplotHCxval(retroSummary, subplots = \"cpue\", add = TRUE) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with only 1 of 5 prediction residuals for Index SURVEY1 #> #> Warning: Unequal spacing of naive predictions residuals may influence the interpretation of MASE #> #> Computing MASE with all 5 of 5 prediction residuals for Index SURVEY2 #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 SURVEY1 1 0.5026435 0.08879379 0.1766536 0.5026435 1 #> 2 SURVEY2 1 0.6149530 0.37737925 0.6136717 0.6149530 5"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/hcxval.html","id":"composition-data","dir":"Articles","previous_headings":"Visualizing Output","what":"Composition Data","title":"Hindcast Cross-Validation","text":"visualize mean length mean age, need add additional step. forecast length- age-composition information stored “ghost files” SS report.sso file, need use ss3diags::SSretroComps() extract summarize information creating plots.","code":"retroSummary_comps <- SSretroComps(retro_mods) r4ss::sspar(mfrow = c(1,2)) hcl <- SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, ylim = c(40,75)) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> Computing MASE with only 1 of 5 prediction residuals for Index SURVEY1 #> #> Warning: Unequal spacing of naive predictions residuals may influence the interpretation of MASE #> #> MASE stats by Index:"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/hcxval.html","id":"customizing-the-plot","dir":"Articles","previous_headings":"Visualizing Output","what":"Customizing the Plot","title":"Hindcast Cross-Validation","text":"HCxval plots can customized many ways, common features may want specify : displaying specific fleet removing uncertainty intervals adjusting x- y-axis displaying adjusted MASE value plot Examples changes shown , incrementally making adjustment.","code":"r4ss::sspar(mfrow = c(2,2)) SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, indexselect = 1) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5 SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, indexselect = 1, indexUncertainty = FALSE) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5 SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, indexselect = 1, indexUncertainty = FALSE, ylim = c(45,70)) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5 SSplotHCxval(retroSummary_comps, subplots = \"len\", add = TRUE, indexselect = 1, indexUncertainty = FALSE, ylim = c(45,70), show.mase.adj = F) #> Plotting Hindcast Cross-Validation (one-step-ahead) #> #> Computing MASE with all 5 of 5 prediction residuals for Index FISHERY #> #> MASE stats by Index: #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/hcxval.html","id":"summary-table","dir":"Articles","previous_headings":"","what":"Summary Table","title":"Hindcast Cross-Validation","text":"addition HCxval plots, summary statistics table can produced using ss3diags::SSmase(). table includes: Index - fleet Season MASE - MASE score MAE.PR - mean absolute error prediction residuals MASE.base - naive prediction MASE.adj - adjusted MASE score n.eval - number points prediction skill calculated Adjusted MASE gets invoked cases inter-annual variation observed values small (default MAE < 0.1 naive predictions log(y[t+1])-log(y[t])). reasoning prediction residuals must already accurate fall threshold. adjusted MASE essential keep naive prediction MAE denominator MASE maximum. show effect changing adjustment threshold default MAE.base.adj = 0.1 larger value MAE.base.adj = 0.15 MASE ratio mean absolute error prediction residuals MAE.PR residuals naive predictions MAE.base MASE.adj","code":"mase1 = SSmase(retroSummary_comps, quant=\"len\", MAE.base.adj = 0.1) mase1 #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.1034467 5 #> 2 SURVEY1 1 0.6526074 0.05142002 0.07879167 0.5142002 1 #> 3 joint 0.4628955 0.01719056 0.03713702 0.1719056 6 SSmase(retroSummary_comps, quant=\"len\", MAE.base.adj = 0.15) #> Index Season MASE MAE.PR MAE.base MASE.adj n.eval #> 1 FISHERY 1 0.3591138 0.01034467 0.02880609 0.06896444 5 #> 2 SURVEY1 1 0.6526074 0.05142002 0.07879167 0.34280015 1 #> 3 joint 0.4628955 0.01719056 0.03713702 0.11460372 6 mase1$MAE.PR/mase1$MAE.base #> [1] 0.3591138 0.6526074 0.4628955 mase1$MASE #> [1] 0.3591138 0.6526074 0.4628955 mase1$MAE.PR/pmax(mase1$MAE.base,0.1) #> [1] 0.1034467 0.5142002 0.1719056 mase1$MASE.adj #> [1] 0.1034467 0.5142002 0.1719056"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/likelihood.html","id":"model-inputs","dir":"Articles","previous_headings":"","what":"Model inputs","title":"Likelihood Profile","text":"run stock synthesis model, 4 input files required: starter, forecast, control, data. input files example model can found within ss3diags package accessed shown . Also, r4ss installed, need install tutorial. need make sure SS executable file either path directory running profile (case dir_profile). easy way get latest release stock synthesis use r4ss function get_ss3_exe().","code":"install.packages(\"pak\") pak::pkg_install(\"r4ss/r4ss\") library(r4ss) files_path <- system.file(\"extdata\", package = \"ss3diags\") dir_tmp <- tempdir(check = TRUE) dir_profile <- file.path(dir_tmp, \"profile\") dir.create(dir_profile, showWarnings = FALSE, recursive = TRUE) list.files(files_path) #> [1] \"control.ss\" \"data.ss\" \"forecast.ss\" \"starter.ss\" file.copy(from = list.files(files_path, full.names = TRUE), to = dir_tmp) #> [1] TRUE TRUE TRUE TRUE r4ss::get_ss3_exe(dir = dir_tmp, version = \"v3.30.21\") #> The stock synthesis executable for Linux v3.30.21 was downloaded to: /tmp/RtmpXsJ4IS/ss3"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/likelihood.html","id":"r0-profile","dir":"Articles","previous_headings":"","what":"R0 Profile","title":"Likelihood Profile","text":"4 input files SS executable, can run likelihood profile shown . first step run model like profile . dir_tmp copy necessary files dir_profile. ’s best run profile subdirectory main model run keep output files separate diagnostic tests may run. input files need dir_profile need create vector values profile across. range increments choose depend model resolution want analyze likelihood profile. example use fairly course resolution speed total run time. also need modify starter file changing name control file read making sure likelihood calculated non-estimated quantities. run profile, use r4ss::profile() need specify partial string name parameter profiling (case “SR_LN” match “SR_LN(R0)”), vector values profile across. newctlfile control file adjusted values profilevec can named anything prefer, just needs match put starter file “cltfile”.","code":"r4ss::run(dir = dir_tmp, exe = \"ss3\", verbose = FALSE) #> [1] \"ran model\" files <- c(\"data.ss\", \"control.ss_new\", \"starter.ss\", \"forecast.ss\", \"ss.par\", \"ss3\") file.copy(from = file.path(dir_tmp, files), to = dir_profile) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE CTL <- SS_readctl_3.30(file = file.path(dir_profile, \"control.ss_new\"), datlist = file.path(dir_profile, \"data.ss\")) CTL$SR_parms #> LO HI INIT PRIOR PR_SD PR_type PHASE env_var&link dev_link #> SR_LN(R0) 6.0 12 8.9274 10.3 10.0 0 1 0 0 #> SR_BH_steep 0.2 1 0.8000 0.8 1.0 0 -4 0 0 #> SR_sigmaR 0.0 2 0.6000 0.8 0.8 0 -4 0 0 #> SR_regime -5.0 5 0.0000 0.0 1.0 0 -4 0 0 #> SR_autocorr 0.0 0 0.0000 0.0 0.0 0 -99 0 0 #> dev_minyr dev_maxyr dev_PH Block Block_Fxn #> SR_LN(R0) 0 0 0 0 0 #> SR_BH_steep 0 0 0 0 0 #> SR_sigmaR 0 0 0 0 0 #> SR_regime 0 0 0 0 0 #> SR_autocorr 0 0 0 0 0 #getting the estimated r0 value r0 <- CTL$SR_parms$INIT[1] #creating a vector that is +/- 1 unit away from the estimated value in increments of 0.2 r0_vec <- seq(r0-1, r0+1, by = 0.2) r0_vec #> [1] 7.9274 8.1274 8.3274 8.5274 8.7274 8.9274 9.1274 9.3274 9.5274 9.7274 #> [11] 9.9274 START <- SS_readstarter(file = file.path(dir_profile, \"starter.ss\"), verbose = FALSE) START$prior_like <- 1 START$ctlfile <- \"control_modified.ss\" SS_writestarter(START, dir = dir_profile, overwrite = TRUE, verbose = F) profile(dir = dir_profile, newctlfile = \"control_modified.ss\", string = \"SR_LN\", profilevec = r0_vec, exe = \"ss3\", verbose = FALSE) #> running profile i=1/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.9274 7.9274 1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=2/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 7.9274 8.1274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=3/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.1274 8.3274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=4/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.3274 8.5274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=5/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.5274 8.7274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=6/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.7274 8.9274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=7/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 8.9274 9.1274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=8/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 9.1274 9.3274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=9/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 9.3274 9.5274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=10/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 9.5274 9.7274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> running profile i=11/11 #> Parameter names in control file matching input vector #> 'strings' (n=1): SR_LN(R0) #> line numbers in control file (n=1): 120 #> Wrote new file to control_modified.ss with the following changes: #> oldvals newvals oldphase newphase oldlos newlos oldhis newhis oldprior #> 1 9.7274 9.9274 -1 -1 6 6 12 12 10.3 #> newprior oldprsd newprsd oldprtype newprtype comment #> 1 10.3 10 10 0 0 # SR_LN(R0) #> Value converged[whichruns] TOTAL Catch Equil_catch Survey #> 1 7.9274 TRUE 1067.570 4.40715e-01 16.620400 6.065520 #> 2 8.1274 TRUE 940.077 2.29735e-01 12.985200 1.965820 #> 3 8.3274 TRUE 844.236 1.08857e-01 9.799480 -2.132340 #> 4 8.5274 TRUE 790.513 9.17170e-06 3.930790 -5.726270 #> 5 8.7274 TRUE 762.562 6.48948e-08 0.271032 -7.140910 #> 6 8.9274 TRUE 754.302 1.33458e-10 0.174869 -7.118110 #> 7 9.1274 TRUE 758.927 2.10816e-13 1.337060 -6.106700 #> 8 9.3274 TRUE 767.708 1.90347e-13 3.424990 -4.917570 #> 9 9.5274 TRUE 777.243 1.15331e-13 6.433440 -3.857200 #> 10 9.7274 TRUE 787.189 6.73658e-14 10.382600 -2.563580 #> 11 9.9274 TRUE 798.152 4.05051e-14 15.279300 -0.380771 #> Length_comp Age_comp Size_at_age Recruitment InitEQ_Regime #> 1 453.198 341.340 230.715 19.181500 0.00000e+00 #> 2 418.750 291.595 201.557 12.989400 0.00000e+00 #> 3 393.384 257.968 179.068 6.036600 0.00000e+00 #> 4 379.721 243.456 167.416 1.713560 1.54502e-30 #> 5 370.420 234.970 163.525 0.515980 1.54502e-30 #> 6 366.756 231.845 162.399 0.244060 1.54502e-30 #> 7 367.497 233.210 162.675 0.312441 0.00000e+00 #> 8 369.543 235.957 163.170 0.529082 0.00000e+00 #> 9 371.605 238.622 163.598 0.839498 1.54502e-30 #> 10 373.376 240.872 163.942 1.178030 0.00000e+00 #> 11 374.815 242.718 164.208 1.510550 0.00000e+00 #> Forecast_Recruitment Parm_priors Parm_softbounds Parm_devs Crash_Pen #> 1 0 0 0.00756177 0 0 #> 2 0 0 0.00433602 0 0 #> 3 0 0 0.00337783 0 0 #> 4 0 0 0.00197985 0 0 #> 5 0 0 0.00143663 0 0 #> 6 0 0 0.00141332 0 0 #> 7 0 0 0.00150262 0 0 #> 8 0 0 0.00159065 0 0 #> 9 0 0 0.00166199 0 0 #> 10 0 0 0.00171844 0 0 #> 11 0 0 0.00176282 0 0"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/likelihood.html","id":"visualizing-output","dir":"Articles","previous_headings":"","what":"Visualizing Output","title":"Likelihood Profile","text":"profile finished running, can visualize results determine conflict data sources. data sources reach minimum R0 value, indicates good agreement . However, likely, one minimized different R0 values global R0 value. sign conflict data sources may require consider data weighting. profile plot shows changes log-likelihood across vector values profiled total likelihood contributing components. minimum threshold component must contribute data source model show plot, contribution may large enough. steepness trajectory indicates informative () data source . example, age data plot much steeper left side minimum R0 value index data, suggests age composition data informative model. can also plot data-type fleet-specific profiles using r4ss::PinerPlot(). plotting profile length composition data fleet likelihood survey data fleet. allow us see conflicts sources main drivers.","code":"profile_mods <- SSgetoutput(dirvec = dir_profile, keyvec = 1:length(r0_vec), verbose = FALSE) profile_mods_sum <- SSsummarize(profile_mods, verbose = FALSE) SSplotProfile(profile_mods_sum, profile.string = \"SR_LN\", profile.label = \"SR_LN(R0)\") #> Parameter matching profile.string=SR_LN: SR_LN(R0) #> Parameter values (after subsetting based on input 'models'): 7.9274, 8.1274, 8.3274, 8.5274, 8.7274, 8.9274, 9.1274, 9.3274, 9.5274, 9.7274, 9.9274 #> Likelihood components showing max change as fraction of total change. #> To change which components are included, change input 'minfraction'. #> frac_change include label #> TOTAL 1.0000 TRUE Total #> Catch 0.0014 FALSE Catch #> Equil_catch 0.0525 TRUE Equilibrium catch #> Survey 0.0422 TRUE Index data #> Length_comp 0.2759 TRUE Length data #> Age_comp 0.3495 TRUE Age data #> Size_at_age 0.2181 TRUE Size-at-age data #> Recruitment 0.0605 TRUE Recruitment #> InitEQ_Regime 0.0000 FALSE Initital equilibrium recruitment #> Forecast_Recruitment 0.0000 FALSE Forecast recruitment #> Parm_priors 0.0000 FALSE Priors #> Parm_softbounds 0.0000 FALSE Soft bounds #> Parm_devs 0.0000 FALSE Parameter deviations #> Crash_Pen 0.0000 FALSE Crash penalty sspar(mfrow = c(1,2)) PinerPlot(profile_mods_sum, component = \"Length_like\", main = \"Length\") #> Parameter matching profile.string = 'R0': 'SR_LN(R0) #> Parameter values (after subsetting based on input 'models'): 7.9274, 8.1274, 8.3274, 8.5274, 8.7274, 8.9274, 9.1274, 9.3274, 9.5274, 9.7274, 9.9274, #> Fleet-specific likelihoods showing max change as fraction of total change. #> To change which components are included, change input 'minfraction'. #> frac_change include #> FISHERY 0.6825 TRUE #> SURVEY1 0.3208 TRUE #> SURVEY2 0.0000 FALSE PinerPlot(profile_mods_sum, component = \"Surv_like\", main = \"Survey\") #> Parameter matching profile.string = 'R0': 'SR_LN(R0) #> Parameter values (after subsetting based on input 'models'): 7.9274, 8.1274, 8.3274, 8.5274, 8.7274, 8.9274, 9.1274, 9.3274, 9.5274, 9.7274, 9.9274, #> Fleet-specific likelihoods showing max change as fraction of total change. #> To change which components are included, change input 'minfraction'. #> frac_change include #> FISHERY 0.0000 FALSE #> SURVEY1 0.3218 TRUE #> SURVEY2 0.9202 TRUE"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/residuals.html","id":"runs-test","dir":"Articles","previous_headings":"","what":"Runs Test","title":"Residual Analyses","text":"runs test nonparametric hypothesis test randomness data sequence calculates 2-sided p-value estimate number runs (.e., sequences values sign) reference value. runs test can diagnose model misspecification using residuals fits index composition data (Carvalho et al. 2017) testing non-random patterns residuals. addition, three-sigma limits can considered useful identifying potential outliers data point three standard deviations away expected residual process average unlikely given random process error observed residual distribution. example using “simple_small” SS model included within r4ss package. can read report file model output using r4ss::SS_output() function shown . output SSplotRunstest() includes plot residuals fleet table results runs test ‘three-sigma limit’ values. plots , shaded area represents ‘three-sigma limit’, three residual standard deviations zero. individual residual points fall outside three-sigma limit, colored red. Green shaded area indicates residuals randomly distributed (p-value >= 0.05) whereas red shaded area indicates residuals randomly distributed. Failing runs test (p-value < 0.05) can indicative misspecification conflict indices composition data.","code":"library(r4ss) files_path <- system.file(\"extdata\", \"simple_small\", package = \"r4ss\") report <- SS_output(dir = files_path, verbose = FALSE, printstats = FALSE) sspar(mfrow = c(1,2)) SSplotRunstest(report, add = TRUE) #> Running Runs Test Diagnostics w/ plots forIndex #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Index: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.159 Passed -0.7301441 0.7301441 cpue #> 2 SURVEY2 0.887 Passed -1.1052361 1.1052361 cpue"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/residuals.html","id":"customizing-the-plot","dir":"Articles","previous_headings":"Runs Test","what":"Customizing the Plot","title":"Residual Analyses","text":"Runs test plots can customized, common features may want specify : plotting data types (default Index Abundance) plotting specific fleet(s) adjusting y-axis range plot data types, can specified subplots argument, options include “cpue”, “len”, “age”, “size”, “con”. “con” conditional size--age data “size” generalized size composition data. Fleets can specified using indexselect() function, takes vector fleet numbers plot. Note small adjustment automatically added ylim provide extra white space. third plot, even though set y-axis range -0.5 0.5, y-axis goes -0.6 0.6. want extra space, set ylimAdj = 1 done 4th plot.","code":"sspar(mfrow = c(2,2)) SSplotRunstest(report, subplots = \"len\", indexselect = 1, add = TRUE) #> Running Runs Test Diagnostics w/ plots forMean length #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Mean length: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 FISHERY 0.126 Passed -0.0613176 0.0613176 len SSplotRunstest(report, subplots = \"age\", indexselect = 2, add = TRUE) #> Running Runs Test Diagnostics w/ plots forMean age #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Mean age: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.11 Passed -0.2743816 0.2743816 age SSplotRunstest(report, subplots = \"age\", indexselect = 2, add = TRUE, ylim = c(-0.5, 0.5)) #> Running Runs Test Diagnostics w/ plots forMean age #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Mean age: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.11 Passed -0.2743816 0.2743816 age SSplotRunstest(report, subplots = \"age\", indexselect = 2, add = TRUE, ylim = c(-0.5, 0.5), ylimAdj = 1) #> Running Runs Test Diagnostics w/ plots forMean age #> Plotting Residual Runs Tests #> Residual Runs Test (/w plot) stats by Mean age: #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.11 Passed -0.2743816 0.2743816 age"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/residuals.html","id":"summary-table","dir":"Articles","previous_headings":"Runs Test","what":"Summary Table","title":"Residual Analyses","text":"addition residual plots, SSplotRunstest() produces summary table runs test output values, including: p-value runs test test passed failed (indicated green red shading plot) upper lower limits 3-sigma interval type data tested (CPUE, length-composition, age-composition, conditional age--length) produce summary table skip plot, e.g. faciliate automated processing, use SSrunstest().","code":"rcpue <- SSrunstest(report, quants = \"cpue\") #> Running Runs Test Diagnosics for Index #> Computing Residual Runs Tests #> Residual Runs Test stats by Index: rlen <- SSrunstest(report, quants = \"len\") #> Running Runs Test Diagnosics for Mean length #> Computing Residual Runs Tests #> Residual Runs Test stats by Mean length: rbind(rcpue, rlen) #> Index runs.p test sigma3.lo sigma3.hi type #> 1 SURVEY1 0.159 Passed -0.7301441 0.7301441 cpue #> 2 SURVEY2 0.887 Passed -1.1052361 1.1052361 cpue #> 3 FISHERY 0.126 Passed -0.0613176 0.0613176 len #> 4 SURVEY1 0.841 Passed -0.1725225 0.1725225 len"},{"path":"https://pifscstockassessments.github.io/ss3diags/articles/residuals.html","id":"rmse","dir":"Articles","previous_headings":"","what":"RMSE","title":"Residual Analyses","text":"RMSE root mean square error useful evaluating far predictions fall observed data. ss3diags::SSplotJABBAres() function allows visualize full time series residuals fleets indicated data (index abundance composition). example , plot residuals index abundance, mean age (age-composition), mean length (length composition) fleets. plots , point represents difference observed expected value (residual) color-coded correspond specific fleet. solid, color-coded vertical lines horizontal dashed line (y = 0) show distance 0 residual value. Box plots summarize spread residual values across fleets within year thick solid black line loess smoother fit residual points. Total RMSE displayed top right corner. assessing plot, important see patterns trends residuals, large overall RMSE , whether data different fleets generally agrees conflicts . retrieve just RMSE residual values without generating plot, SSrmse() produces named list 2 objects, RMSE residuals. can accessed shown . function useful automating analyses.","code":"sspar(mfrow = c(2,2)) SSplotJABBAres(report, subplots = \"cpue\", add = TRUE) #> Plotting JABBA residual plot. #> is plot TRUE? TRUE #> drawing plot at #> Plot exists: #> RMSE stats by Index: #> # A tibble: 3 × 3 #> Fleet RMSE.perc Nobs #> #> 1 SURVEY1 21.6 4 #> 2 SURVEY2 27.7 12 #> 3 Combined 26.3 16 SSplotJABBAres(report, subplots = \"age\", add = TRUE) #> Plotting JABBA residual plot. #> is plot TRUE? TRUE #> drawing plot at #> Plot exists: #> RMSE stats by Index: #> # A tibble: 3 × 3 #> Fleet RMSE.perc Nobs #> #> 1 FISHERY 9 12 #> 2 SURVEY1 8.1 4 #> 3 Combined 8.8 16 SSplotJABBAres(report, subplots = \"len\", add = TRUE, ylim = c(-0.2,0.2)) #> Plotting JABBA residual plot. #> is plot TRUE? TRUE #> drawing plot at #> Plot exists: #> RMSE stats by Index: #> # A tibble: 3 × 3 #> Fleet RMSE.perc Nobs #> #> 1 FISHERY 2.1 12 #> 2 SURVEY1 3.4 4 #> 3 Combined 2.5 16 rmse <- SSrmse(report, quants = \"cpue\")$RMSE residuals <- SSrmse(report, quants = \"cpue\")$residuals rmse #> # A tibble: 3 × 3 #> Fleet RMSE.perc Nobs #> #> 1 SURVEY1 21.6 4 #> 2 SURVEY2 27.7 12 #> 3 Combined 26.3 16 head(residuals) #> Fleet Fleet_name Area Yr Seas Subseas Month Time Vuln_bio Obs #> 925 2 SURVEY1 1 2013 1 2 7 2013.5 62947.50 144745.0000 #> 926 2 SURVEY1 1 2016 1 2 7 2016.5 49335.70 63760.3000 #> 927 2 SURVEY1 1 2019 1 2 7 2019.5 38132.00 59242.9000 #> 928 2 SURVEY1 1 2022 1 2 7 2022.5 34045.80 49649.7000 #> 929 3 SURVEY2 1 2011 1 2 7 2011.5 6306.83 11.5668 #> 930 3 SURVEY2 1 2012 1 2 7 2012.5 6544.96 13.9955 #> Exp Calc_Q Eff_Q SE SE_input Dev Like #> 925 101399.0000 1.61084000 1.61084000 0.3 0.3 0.35591400 7.03749e-01 #> 926 79472.2000 1.61084000 1.61084000 0.3 0.3 -0.22027600 2.69564e-01 #> 927 61424.7000 1.61084000 1.61084000 0.3 0.3 -0.03616590 7.26653e-03 #> 928 54842.4000 1.61084000 1.61084000 0.3 0.3 -0.09947210 5.49706e-02 #> 929 11.5342 0.00182885 0.00182885 0.7 0.7 0.00281831 8.10497e-06 #> 930 11.9698 0.00182885 0.00182885 0.7 0.7 0.15635300 2.49451e-02 #> Like+log(s) SuprPer Use residuals #> 925 -0.500223 NA 1 0.355910344 #> 926 -0.934409 NA 1 -0.220276535 #> 927 -1.196710 NA 1 -0.036166093 #> 928 -1.149000 NA 1 -0.099471269 #> 929 -0.356667 NA 1 0.002822391 #> 930 -0.331730 NA 1 0.156349038"},{"path":"https://pifscstockassessments.github.io/ss3diags/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Henning Winker. Author. Felipe Carvalho. Author. Massimiliano Cardinale. Author. Laurence Kell. Author. Megumi Oshima. Author, maintainer. Eric Fletcher. Author.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Winker H, Carvalho F, Cardinale M, Kell L, Oshima M, Fletcher E (2024). ss3diags: Stock Synthesis Model Diagnostics Intergated Stock Assessments. R package version 2.1.1, https://github.com/PIFSCstockassessments/ss3diags.","code":"@Manual{, title = {ss3diags: Stock Synthesis Model Diagnostics for Intergated Stock Assessments}, author = {Henning Winker and Felipe Carvalho and Massimiliano Cardinale and Laurence Kell and Megumi Oshima and Eric Fletcher}, year = {2024}, note = {R package version 2.1.1}, url = {https://github.com/PIFSCstockassessments/ss3diags}, }"},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"ss3diags-","dir":"","previous_headings":"","what":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"R package ss3diags enables users apply advanced diagnostics evaluate Stock Synthesis model. Diagnostics include residual analyses, hindcast cross-validation techniques, retrospective analyses. Functions also allow users reproduce key model diagnostics plots presented paper ‘Cookbook Using Model Diagnostics Integrated Stock Assessments’. ss3diags Github repository provides step--step R recipes : Run jitter analysis Conduct retrospective analysis Use hindcast cross-validation log-likelood profiling R0 Run ASPM diagnostic Evaluate model fit Stock Synthesis making use comprehensive collection R functions available R packages r4ss ss3diags.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"ss3diags currently supported CRAN. can install development version ss3diags GitHub : package installed can loaded : examples run common diagnostic tests SS models visualize results diagnostic tests using r4ss ss3diags packages, please refer articles package website.","code":"# install.packages(\"remotes\") remotes::install_github(\"PIFSCstockassessments/ss3diags\") library(ss3diags)"},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"contributing-to-ss3diags","dir":"","previous_headings":"","what":"Contributing to ss3diags","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"like contribute ss3diags suggestions diagnostic tests include package, can submit new issue contact Meg megumi.oshima@noaa.gov.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"reference","dir":"","previous_headings":"","what":"Reference","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"cite ss3diags publication can use","code":"citation(\"ss3diags\") #> #> To cite package 'ss3diags' in publications use: #> #> Henning Winker, Felipe Carvalho, Massimiliano Cardinale, Laurence #> Kell, Megumi Oshima and Eric Fletcher (2023). ss3diags: Stock #> Synthesis Model Diagnostics for Intergated Stock Assessments. R #> package version 2.1.1. #> https://github.com/PIFSCstockassessments/ss3diags #> #> A BibTeX entry for LaTeX users is #> #> @Manual{, #> title = {ss3diags: Stock Synthesis Model Diagnostics for Intergated Stock Assessments}, #> author = {Henning Winker and Felipe Carvalho and Massimiliano Cardinale and Laurence Kell and Megumi Oshima and Eric Fletcher}, #> year = {2023}, #> note = {R package version 2.1.1}, #> url = {https://github.com/PIFSCstockassessments/ss3diags}, #> }"},{"path":"https://pifscstockassessments.github.io/ss3diags/index.html","id":"disclaimer","dir":"","previous_headings":"","what":"Disclaimer","title":"Stock Synthesis Model Diagnostics for Intergated Stock Assessments","text":"United States Department Commerce (DOC) GitHub project code provided ‘’ basis user assumes responsibility use. DOC relinquished control information longer responsibility protect integrity, confidentiality, availability information. claims Department Commerce stemming use GitHub project governed applicable Federal law. reference specific commercial products, processes, services service mark, trademark, manufacturer, otherwise, constitute imply endorsement, recommendation favoring Department Commerce. Department Commerce seal logo, seal logo DOC bureau, shall used manner imply endorsement commercial product activity DOC United States Government.”","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":null,"dir":"Reference","previous_headings":"","what":"Francis Weighting for compositional data — SScompsTA1.8","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"TA1.8 Francis function modified r4ss::SSMethod.TA1.8 r4ss::SSMethod.Cond.TA1.8 apply Francis weighting method TA1.8 length-, age-, generalized size-composition data, conditional age--length data Stock Synthesis model. conditional age--length data, mean age year calculated based recommendations Punt (2015). main purpose create dataframe annual observed expected mean length age fleet used calculate residuals testing model fit. function used SSplotRunstest SSplotJABBAres.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"","code":"SScompsTA1.8( ss3rep, type = c(\"len\", \"age\", \"size\", \"con\"), fleet = NULL, seas = NULL, plotit = FALSE, maxpanel = 1000 )"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"ss3rep Stock Synthesis output read r4SS function SS_output type string either 'len' (length composition data), 'size' (generalized size composition data), 'age' (age composition data), 'con' (conditional age length data) fleet vector one fleet numbers whose data analysed simultaneously, NULL, fleets analysed seas string indicating treat data multiple seasons 'comb' - combine seasonal data year plot Yr 'sep' - treat season separately, plotting Yr.S. .null(seas), assumed one season option 'comb' used. plotit TRUE, make illustrative plot like one panels Fig. 4 Francis (2011). maxpanel maximum number panels within plot, default 1000","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"ss_out data.frame observed, predicted mean length/age 95% confidence intervals based stage 1 stage 2 weighting runs_dat data.frame observed predicted mean length age year/fleet.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SScompsTA1.8.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Francis Weighting for compositional data — SScompsTA1.8","text":"Francis, R..C.C. (2011). Data weighting statistical fisheries stock assessment models. Canadian Journal Fisheries Aquatic Sciences 68: 1124-1138. #' Punt, .E. (2015). insights data weighting integrated stock assessments. Fish. Res. 0.05 (residuals random) failed p-value < 0.5 (residuals random)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSplotRunstest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Residual Diagnostics — SSplotRunstest","text":"Henning Winker (JRC-EC) Laurance Kell (Sea++)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":null,"dir":"Reference","previous_headings":"","what":"Read SS MCMC — SSreadMCMC","title":"Read SS MCMC — SSreadMCMC","text":"function read mcmc file outputs Stock Synthesis model","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read SS MCMC — SSreadMCMC","text":"","code":"SSreadMCMC(mcmcdir)"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read SS MCMC — SSreadMCMC","text":"mcmcdir file path folder derived_posteriors.sso file","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read SS MCMC — SSreadMCMC","text":"Stock Synthesis mcmc output file","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSreadMCMC.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read SS MCMC — SSreadMCMC","text":"Henning Winker (JRC-EC) & Laurence Kell (Sea++)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve Composition Data from Multiple SS Models — SSretroComps","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"Wrapper get observed expected mean length/age multiple Stock Synthesis models.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"","code":"SSretroComps(retroModels)"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"retroModels object list replists r4ss::SSgetoutput()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"list observed expected mean Length/age comps (c.f. ss3rep[[\"cpue\"]])","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSretroComps.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Retrieve Composition Data from Multiple SS Models — SSretroComps","text":"Henning Winker","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrmse.html","id":null,"dir":"Reference","previous_headings":"","what":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","title":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","text":"Function calculating RMSE used SSplotJABBAres()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrmse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","text":"","code":"SSrmse( ss3rep, quants = c(\"cpue\", \"len\", \"age\", \"con\"), seas = NULL, indexselect = NULL )"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrmse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","text":"ss3rep output SS_output() quants dataset calculate RMSE . \"cpue\" index abundance, \"len\" length comp, \"age\" age composition, \"con\" conditional age--length. seas string indicating treat data multiple seasons 'comb' - combine seasonal data year plot Yr 'sep' - treat season separately, plotting Yr.S. .null(seas), assumed one season option 'comb' used. indexselect Vector fleet numbers model compare","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrmse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function for calculating RMSE\nused for SSplotJABBAres() — SSrmse","text":"returns list includes RMSE table output (fleet combined) dataframe residuals can used creating SSplotJABBAres() plot","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":null,"dir":"Reference","previous_headings":"","what":"Residual Diagnostics Plot — SSrunstest","title":"Residual Diagnostics Plot — SSrunstest","text":"Function residual diagnostics. Outputs runs test table gives runs test p-values, runs test passed (p-value > 0.05, residuals random) failed (p-value < 0.05, residuals random), 3x sigma limits indices mean age length type input data (cpue, length comp, age comp, size comp, conditional age--length).","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Residual Diagnostics Plot — SSrunstest","text":"","code":"SSrunstest( ss3rep = ss3diags::simple, mixing = \"less\", quants = c(\"cpue\", \"len\", \"age\", \"con\")[1], indexselect = NULL, verbose = TRUE )"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Residual Diagnostics Plot — SSrunstest","text":"ss3rep Stock Synthesis output read r4SS function SS_output mixing c(\"less\",\"greater\",\"two.sided\"). Default less checking positive autocorrelation quants optional use c(\"cpue\",\"len\",\"age\",\"con\"), default uses CPUE. indexselect Vector fleet numbers model compare verbose Report progress R GUI?","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Residual Diagnostics Plot — SSrunstest","text":"dataframe runs test p-value, test passed failed, 3x sigma high low limits, type data used. Rows fleet. Note, runs test passed p-value > 0.05 (residuals random) failed p-value < 0.5 (residuals random)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSrunstest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Residual Diagnostics Plot — SSrunstest","text":"Henning Winker (JRC-EC) Laurance Kell (Sea++)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Stock Status Settings — SSsettingsBratioF","title":"Get Stock Status Settings — SSsettingsBratioF","text":"function get Bratio F settings","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Stock Status Settings — SSsettingsBratioF","text":"","code":"SSsettingsBratioF(ss3rep, status = c(\"Bratio\", \"F\"), verbose = TRUE)"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Stock Status Settings — SSsettingsBratioF","text":"ss3rep r4ss::SSgetoutput() status covarying stock status quantaties extract Hessian verbose Report progress R GUI?","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Stock Status Settings — SSsettingsBratioF","text":"output list Bratio F settings","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/SSsettingsBratioF.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Stock Status Settings — SSsettingsBratioF","text":"Henning Winker (JRC-EC)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ensemble_plot_index.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Indices — ensemble_plot_index","title":"Plot Indices — ensemble_plot_index","text":"function plot different fits single index abundance","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ensemble_plot_index.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Indices — ensemble_plot_index","text":"","code":"ensemble_plot_index( summaryoutput, varlist, indexfleets = 1, verbose = TRUE, legendloc = \"topright\", legendcex = 1, legendsp = 0.9, legendncol = 1, type = \"l\" )"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ensemble_plot_index.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Indices — ensemble_plot_index","text":"summaryoutput summaryoutput varlist variable list indexfleets Fleet vector index verbose Option output messages Rconsole legendloc Location legend. Either string like \"topleft\" vector two numeric values representing fraction maximum x y dimensions, respectively. See ?legend info string options. legendcex Allows adjust legend cex legendsp Space legend labels legendncol Number columns legend. type Type parameter passed points (default 'o' overplots points top lines)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":null,"dir":"Reference","previous_headings":"","what":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"MCMC output read SSgetMCMC()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"","code":"mcmcSimple"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"Large dataframe MCMC parameter estimates nrow = number values ncol = number parameters mcmcSimple mcmcSimple","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"MCMC evaluated Stock Synthesis","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/mcmcSimple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"MCMC output for simulated Simple Stock Synthesis model. — mcmcSimple","text":"R. Methot,","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"Stock Synthesis output read SS_output()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"","code":"retroSimple"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"Large list 184 objects generated using r4ss Data_File Data_File Control_File Control_File definitions definitions fleet_ID fleet_ID fleet_type fleet_type fleet_timing fleet_timing fleet_area fleet_area catch_units catch_units catch_se catch_se equ_catch_se equ_catch_se survey_units survey_units survey_error survey_error IsFishFleet IsFishFleet nfishfleets nfishfleets nfleets nfleets nsexes nsexes ngpatterns ngpatterns lbins lbins Lbin_method Lbin_method nlbins nlbins lbinspop lbinspop nlbinspop nlbinspop sizebinlist sizebinlist agebins agebins nagebins nagebins accuage accuage nareas nareas startyr startyr endyr endyr nseasons nseasons seasfracs seasfracs seasdurations seasdurations N_sub_seasons N_sub_seasons Spawn_month Spawn_month Spawn_seas Spawn_seas Spawn_timing_in_season Spawn_timing_in_season Retro_year Retro_year N_forecast_yrs N_forecast_yrs Empirical_wt_at_age Empirical_wt_at_age N_bio_patterns N_bio_patterns N_platoons N_platoons NatMort_option NatMort_option GrowthModel_option GrowthModel_option Maturity_option Maturity_option Fecundity_option Fecundity_option Start_from_par Start_from_par Do_all_priors Do_all_priors Use_softbound Use_softbound N_nudata N_nudata Max_phase Max_phase Current_phase Current_phase Jitter Jitter ALK_tolerance ALK_tolerance nforecastyears nforecastyears morph_indexing morph_indexing MGparmAdj MGparmAdj forecast_selectivity forecast_selectivity SelSizeAdj SelSizeAdj SelAgeAdj SelAgeAdj recruitment_dist recruitment_dist recruit recruit SPAWN_RECR_CURVE SPAWN_RECR_CURVE breakpoints_for_bias_adjustment_ramp breakpoints_for_bias_adjustment_ramp SpawnOutputUnits SpawnOutputUnits biology biology FecType FecType FecPar1name FecPar1name FecPar2name FecPar2name FecPar1 FecPar1 FecPar2 FecPar2 M_type M_type Natural_Mortality_Bmark Natural_Mortality_Bmark Natural_Mortality_endyr Natural_Mortality_endyr Growth_Parameters Growth_Parameters growthCVtype growthCVtype endgrowth endgrowth wtatage_switch wtatage_switch mean_body_wt mean_body_wt growthseries growthseries growthvaries growthvaries sizeselex sizeselex ageselex ageselex F_method F_method exploitation exploitation catch catch summary_age summary_age timeseries timeseries spawnseas spawnseas mainmorphs mainmorphs birthseas birthseas depletion_method depletion_method depletion_basis depletion_basis discard discard discard_type discard_type DF_discard DF_discard discard_spec discard_spec mnwgt mnwgt DF_mnwgt DF_mnwgt sprseries sprseries managementratiolabels managementratiolabels F_report_basis F_report_basis B_ratio_denominator B_ratio_denominator sprtarg sprtarg btarg btarg minbthresh minbthresh Kobe_warn Kobe_warn Kobe_MSY_basis Kobe_MSY_basis Kobe Kobe index_variance_tuning_check index_variance_tuning_check cpue cpue natage natage natage_annual_1_no_fishery natage_annual_1_no_fishery natage_annual_2_with_fishery natage_annual_2_with_fishery batage batage natlen natlen batlen batlen fatage fatage discard_at_age discard_at_age catage catage movement movement ALK ALK N_ageerror_defs N_ageerror_defs equil_yield equil_yield Z_at_age Z_at_age M_at_age M_at_age Dynamic_Bzero Dynamic_Bzero comp_data_exists comp_data_exists lendbase lendbase sizedbase sizedbase agedbase agedbase condbase condbase ghostagedbase ghostagedbase ghostcondbase ghostcondbase ghostlendbase ghostlendbase ladbase ladbase wadbase wadbase tagdbase1 tagdbase1 tagdbase2 tagdbase2 len_comp_fit_table len_comp_fit_table size_comp_fit_table size_comp_fit_table derived_quants derived_quants parameters parameters FleetNames FleetNames repfiletime repfiletime SRRtype SRRtype Pstar_sigma Pstar_sigma OFL_sigma OFL_sigma CoVar CoVar highcor highcor lowcor lowcor corstats corstats stdtable stdtable recruitpars recruitpars RecrDistpars RecrDistpars wtatage wtatage jitter_info jitter_info SS_version SS_version SS_versionshort SS_versionshort SS_versionNumeric SS_versionNumeric StartTime StartTime RunTime RunTime Files_used Files_used Nwarnings Nwarnings warnings warnings likelihoods_used likelihoods_used likelihoods_laplace likelihoods_laplace likelihoods_by_fleet likelihoods_by_fleet N_estimated_parameters N_estimated_parameters table_of_phases table_of_phases estimated_non_dev_parameters estimated_non_dev_parameters log_det_hessian log_det_hessian maximum_gradient_component maximum_gradient_component parameters_with_highest_gradients parameters_with_highest_gradients Length_Comp_Fit_Summary Length_Comp_Fit_Summary Age_Comp_Fit_Summary Age_Comp_Fit_Summary SBzero SBzero current_depletion current_depletion last_years_SPR last_years_SPR SPRratioLabel SPRratioLabel sigma_R_in sigma_R_in sigma_R_info sigma_R_info rmse_table rmse_table logfile logfile inputs inputs","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"simulated ss3sim","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/retroSimple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Retrospective runs for simulated Simple Stock Synthesis model. — retroSimple","text":"R. Methot","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":null,"dir":"Reference","previous_headings":"","what":"A simulated Simple Stock Synthesis model for a ","title":"A simulated Simple Stock Synthesis model for a ","text":"Stock Synthesis output read SS_output()","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A simulated Simple Stock Synthesis model for a ","text":"","code":"simple"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A simulated Simple Stock Synthesis model for a ","text":"Large list 184 objects generated using r4ss Data_File Data_File Control_File Control_File definitions definitions fleet_ID fleet_ID fleet_type fleet_type fleet_timing fleet_timing fleet_area fleet_area catch_units catch_units catch_se catch_se equ_catch_se equ_catch_se survey_units survey_units survey_error survey_error IsFishFleet IsFishFleet nfishfleets nfishfleets nfleets nfleets nsexes nsexes ngpatterns ngpatterns lbins lbins Lbin_method Lbin_method nlbins nlbins lbinspop lbinspop nlbinspop nlbinspop sizebinlist sizebinlist agebins agebins nagebins nagebins accuage accuage nareas nareas startyr startyr endyr endyr nseasons nseasons seasfracs seasfracs seasdurations seasdurations N_sub_seasons N_sub_seasons Spawn_month Spawn_month Spawn_seas Spawn_seas Spawn_timing_in_season Spawn_timing_in_season Retro_year Retro_year N_forecast_yrs N_forecast_yrs Empirical_wt_at_age Empirical_wt_at_age N_bio_patterns N_bio_patterns N_platoons N_platoons NatMort_option NatMort_option GrowthModel_option GrowthModel_option Maturity_option Maturity_option Fecundity_option Fecundity_option Start_from_par Start_from_par Do_all_priors Do_all_priors Use_softbound Use_softbound N_nudata N_nudata Max_phase Max_phase Current_phase Current_phase Jitter Jitter ALK_tolerance ALK_tolerance nforecastyears nforecastyears morph_indexing morph_indexing MGparmAdj MGparmAdj forecast_selectivity forecast_selectivity SelSizeAdj SelSizeAdj SelAgeAdj SelAgeAdj recruitment_dist recruitment_dist recruit recruit SPAWN_RECR_CURVE SPAWN_RECR_CURVE breakpoints_for_bias_adjustment_ramp breakpoints_for_bias_adjustment_ramp SpawnOutputUnits SpawnOutputUnits biology biology FecType FecType FecPar1name FecPar1name FecPar2name FecPar2name FecPar1 FecPar1 FecPar2 FecPar2 M_type M_type Natural_Mortality_Bmark Natural_Mortality_Bmark Natural_Mortality_endyr Natural_Mortality_endyr Growth_Parameters Growth_Parameters growthCVtype growthCVtype endgrowth endgrowth wtatage_switch wtatage_switch mean_body_wt mean_body_wt growthseries growthseries growthvaries growthvaries sizeselex sizeselex ageselex ageselex F_method F_method exploitation exploitation catch catch summary_age summary_age timeseries timeseries spawnseas spawnseas mainmorphs mainmorphs birthseas birthseas depletion_method depletion_method depletion_basis depletion_basis discard discard discard_type discard_type DF_discard DF_discard discard_spec discard_spec mnwgt mnwgt DF_mnwgt DF_mnwgt sprseries sprseries managementratiolabels managementratiolabels F_report_basis F_report_basis B_ratio_denominator B_ratio_denominator sprtarg sprtarg btarg btarg minbthresh minbthresh Kobe_warn Kobe_warn Kobe_MSY_basis Kobe_MSY_basis Kobe Kobe index_variance_tuning_check index_variance_tuning_check cpue cpue natage natage natage_annual_1_no_fishery natage_annual_1_no_fishery natage_annual_2_with_fishery natage_annual_2_with_fishery batage batage natlen natlen batlen batlen fatage fatage discard_at_age discard_at_age catage catage movement movement ALK ALK N_ageerror_defs N_ageerror_defs equil_yield equil_yield Z_at_age Z_at_age M_at_age M_at_age Dynamic_Bzero Dynamic_Bzero comp_data_exists comp_data_exists lendbase lendbase sizedbase sizedbase agedbase agedbase condbase condbase ghostagedbase ghostagedbase ghostcondbase ghostcondbase ghostlendbase ghostlendbase ladbase ladbase wadbase wadbase tagdbase1 tagdbase1 tagdbase2 tagdbase2 len_comp_fit_table len_comp_fit_table size_comp_fit_table size_comp_fit_table derived_quants derived_quants parameters parameters FleetNames FleetNames repfiletime repfiletime SRRtype SRRtype Pstar_sigma Pstar_sigma OFL_sigma OFL_sigma CoVar CoVar highcor highcor lowcor lowcor corstats corstats stdtable stdtable recruitpars recruitpars RecrDistpars RecrDistpars wtatage wtatage jitter_info jitter_info SS_version SS_version SS_versionshort SS_versionshort SS_versionNumeric SS_versionNumeric StartTime StartTime RunTime RunTime Files_used Files_used Nwarnings Nwarnings warnings warnings likelihoods_used likelihoods_used likelihoods_laplace likelihoods_laplace likelihoods_by_fleet likelihoods_by_fleet N_estimated_parameters N_estimated_parameters table_of_phases table_of_phases estimated_non_dev_parameters estimated_non_dev_parameters log_det_hessian log_det_hessian maximum_gradient_component maximum_gradient_component parameters_with_highest_gradients parameters_with_highest_gradients Length_Comp_Fit_Summary Length_Comp_Fit_Summary Age_Comp_Fit_Summary Age_Comp_Fit_Summary SBzero SBzero current_depletion current_depletion last_years_SPR last_years_SPR SPRratioLabel SPRratioLabel sigma_R_in sigma_R_in sigma_R_info sigma_R_info rmse_table rmse_table logfile logfile inputs inputs","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"A simulated Simple Stock Synthesis model for a ","text":"simulated ss3sim","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/simple.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A simulated Simple Stock Synthesis model for a ","text":"R. Methot,","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":null,"dir":"Reference","previous_headings":"","what":"Runs Test for Residuals — ssruns_sig3","title":"Runs Test for Residuals — ssruns_sig3","text":"function uses randtests::runs.test perform runs test residuals determine randomly distributed. also calculates 3 x sigma limits","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Runs Test for Residuals — ssruns_sig3","text":"","code":"ssruns_sig3(x, type = NULL, mixing = \"less\")"},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Runs Test for Residuals — ssruns_sig3","text":"x residuals CPUE fits type c(\"resid\",\"observations\") mixing c(\"less\",\"greater\",\"two.sided\"). Default less checking positive autocorrelation ","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Runs Test for Residuals — ssruns_sig3","text":"runs p value 3 x sigma limits","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Runs Test for Residuals — ssruns_sig3","text":"runs test conducted library(randtests)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/reference/ssruns_sig3.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Runs Test for Residuals — ssruns_sig3","text":"Henning Winker (JRC-EC) Laurence Kell (Sea++)","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-210","dir":"Changelog","previous_headings":"","what":"ss3diags 2.1.0","title":"ss3diags 2.1.0","text":"RMSE calculations modularized standalone function can called independently SSplotJABBAres() SSrmse(). (#50) Bugfixes adjusting y-axis limits SSplotRunstest SSplotJABBAres: Use ylim parameter adjust y-axis limits. (#46) Added option remove median trajectory SSplotKobe() (#3) Added rlang, dplyr, magrittr dependencies. SSmase SSplotHcxval: Corrected validation messsage clarify validation issue fix issue code styler. (#33, #35) Added Date field DESCRIPTION. DESCRIPTION metadata now used generate package citations. (#25) Package vingettes formatted html_vignette reduce file size. Removed redundant PDF word document versions ss3diags_Handbook vignette. Enabled markdown support roxygen. Enabled Cross-reference links.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-203","dir":"Changelog","previous_headings":"","what":"ss3diags 2.0.3","title":"ss3diags 2.0.3","text":"Changed r4ss dependency 1.44.0 (CRAN version) . Replaced default R CMD CHECK workflow NOAA-fish-tools/ghactions4r’s version. Fixed Ensemble Quantile Shading Issues (#4) Replaced example datasets ss3diags cookbook, handbook current “simple” ensemble model. Fixup minor code documentation formatting issues. SSmase SSplotHcxval: Fixed code styler’s dollar subset conversion issues. example:`message(‘x$name 1,2,3,4’)`","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-202","dir":"Changelog","previous_headings":"","what":"ss3diags 2.0.2","title":"ss3diags 2.0.2","text":"Changed r4ss CRAN version (1.36.1) dependency development version legendfun -> r4ss::add_legend pngfun -> r4ss::save_png rc -> r4ss::rich_colors_short sspar -> r4ss::sspar Fix SSplotRetro.R indention causing issues code styler","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-201","dir":"Changelog","previous_headings":"","what":"ss3diags 2.0.1","title":"ss3diags 2.0.1","text":"Change SSplotJABBAres show combined seasonal data boxplots Fixup links Cookbook sripts. Formatted DESCRIPTION URL BugReports links PIFSCstockassessments repo add R package site.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-200","dir":"Changelog","previous_headings":"","what":"ss3diags 2.0.0","title":"ss3diags 2.0.0","text":"simple, cod-like, Stock Synthesis model, simulated via ss3sim, replaces Pacific North Hake (pac.hke) North Atlantic Shortfin Mako Shark (natl.sma) example datasets. SSplotRetro: fixed bug shading uncertainty area shows xlims specified. SSplotJABBAres: added ‘con’ option subplots argument conditional age--length data can plotted. Also added seas argument user can specify data combined across seasons within year kept separate. SScompsTA1.8: added seas argument users can specify data combined across seasons within year kept separate. SSplot functions (SSplotModelComp, SSplotEnsemble, SSplotHCxval, SSplotJABBAres, SSplotRetro): Marked plot, png, pdf, print, new deprecated. defunct future version. Added NEWS.md file track changes package.","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-108","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.8","title":"ss3diags 1.0.8","text":"Fixed MASE","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-107","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.7","title":"ss3diags 1.0.7","text":"Bug fixes","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-106","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.6","title":"ss3diags 1.0.6","text":"Improved SSdiagsMCMC","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-105","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.5","title":"ss3diags 1.0.5","text":"Updated SSdeltaMVLN","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-104","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.4","title":"ss3diags 1.0.4","text":"Reference: authors changes","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-103","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.3","title":"ss3diags 1.0.3","text":"Added annF_ quantaties","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-102","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.2","title":"ss3diags 1.0.2","text":"Added aut","code":""},{"path":"https://pifscstockassessments.github.io/ss3diags/news/index.html","id":"ss3diags-101","dir":"Changelog","previous_headings":"","what":"ss3diags 1.0.1","title":"ss3diags 1.0.1","text":"Added SSplotH","code":""}]