Open k-doering-NOAA opened 4 years ago
comment from @RickMethot on 2019-02-13: Also, need to check to see if the SD_offset is being used for parameter devs
comment from @RickMethot on 2020-08-11: Find two improvements to make in the usage of parameter deviations:
the dev vectors were created with min-max bounds of -10 and 10. But the check on the current value relative to those bounds was set at -5, 5. So if a run produced large deviations, then when that ss.par was read back into ss, those large values would get truncated. Rectify by putting check at -10 and 10.
In write_report, the routine for checking parameters close to bounds was not being called for parameter deviations. Rectify this with a small bit of new code.
prepare these changes for 3.30.16.
comment from @RickMethot on 2020-08-12: I also did some extensive experimenting and testing which results in the following observations:
comment from @RickMethot on 2020-08-12: extending the last message:
comment from @iantaylor-NOAA on 2020-08-12: Good work Rick making progress on this.
Unfortunately I don't know random effects well enough to comment on this, so I support talking to Tim or others with expertise. I did just look at the WHAM code and see calculation of time-varying and age-dependent M here: https://github.com/timjmiller/wham/blob/master/src/wham_v0.cpp#L434-L483 where Sigma_M is the random effect variance based on notes at https://github.com/timjmiller/wham/blob/master/src/wham_v0.cpp#L139-L142. On first glance it does not appear that WHAM includes a generalized function for random effects that can be applied to different processes.
comment from @RickMethot on 2020-08-12: Thanks Ian. I took a look and the logL of the dev vector seems wrapped up in the Laplace transformation and is a bit opaque to me yet.
Here is the example I am using and the similar results using MRRW and the logit version of MRRW. Both have stddev set to a large value 14 and fixed. logit version produces lower logL because its devs in log space have smaller absolute value, so closer to 0.0, so have logL that is smaller. But these same devs produce a slightly better fit to the agedata. Can you give this a try using NUTS and with estimation of the stddev parameters?
Rick
Richard D. Methot Jr. Ph.D.NOAA Fisheries Senior Scientist for Stock Assessments
Mobile: 301-787-0241
On Wed, Aug 12, 2020 at 4:28 PM vlab.redmine@noaa.gov wrote:
comment from @iantaylor-NOAA on 2020-08-13: I need to get back up to speed on NUTS first, but I will try to work on this sometime tomorrow.
comment from @iantaylor-NOAA on 2020-08-14: The model has been running with adnuts for about 4 hours using ss.exe compiled from the current repository (and ADMB 12.2). I didn't think about how long it might take. There's an option for specifying a duration which in hindsight I could have used, but instead will just let it continue to run over the weekend. I'm on out Monday but will report on results on Tuesday.
Note: the model expected a wtatage.ss file so I used the attached wtatage_used_by_ian.ss file from a recent Simple model assuming that it will be similar enough to have little impact on this test.
comment from @iantaylor-NOAA on 2020-08-18: When I kicked off the NUTS algorithm on Friday I failed to re-read the message and note the suggestion to include "estimation of the stddev". Of course that's the whole point of exploring Bayesian sampling in this case. Also, it took 33 hours to complete the first of three chains, so I stopped it part-way through chain 2 anyway.
I've now just started a new NUTS sampling with 1 chain and using the "duration" argument to limit the length to 24 hours so I can report on something at this time tomorrow. I changed the AgeSel_P2_FISHERY1(1)_dev_se and AgeSel_P3_FISHERY1(1)_dev_se parameters to have MAX = 2.0 and INIT = 0.5 (as shown below) out of concern that sampling really high values will lose signal about the dev_se and make it take longer. I can try again with wider bounds if I'm misguided on what a reasonable range should be.
LO HI INIT PRIOR PR_SD PR_type PHASE # parm_name 0.0001 2 0.5 0.5 0.5 0 6 # AgeSel_P2_FISHERY1(1)_dev_se
comment from @RickMethot on 2020-08-18: I suspect this upper bound will be hit. I suspect that without a better likelihood formulation employing Laplace it will not work well. But good to confirm. I attached the relevant wtatage.ss file
Richard D. Methot Jr. Ph.D.NOAA Fisheries Senior Scientist for Stock Assessments
Mobile: 301-787-0241
On Tue, Aug 18, 2020 at 12:28 PM vlab.redmine@noaa.gov wrote:
comment from @iantaylor-NOAA on 2020-08-18: I just got IT to turn on my desktop at NWFSC which had somehow shut down some weeks ago but it's now available for me to remote desktop into to avoid tying up my laptop with too much processing. I just started a new set there with the upper bound restored to 14. Hopefully I'll have some results tomorrow.
comment from @iantaylor-NOAA on 2020-08-20: I finally looked at the results of the NUTS samples for the 2 dev_se parameters. The median values were 0.066 and 0.165 and no samples above 0.4 as shown in attached figure. The posteriors.sso containing these samples is also attached along with the control file used in the sampling.
I don't know if these results match what was expected, but it was useful for me to learn more about Cole's adnuts R package and also generated some ideas for future additions to the output for deviation parameters (to be added in a separate issue).
comment from @RickMethot on 2020-08-20: Thanks Ian. I will be curious to investigate the rmse of the parmdev vectors
Richard D. Methot Jr. Ph.D.NOAA Fisheries Senior Scientist for Stock Assessments
Mobile: 301-787-0241
On Thu, Aug 20, 2020 at 4:11 PM vlab.redmine@noaa.gov wrote:
comment from @k-doering-NOAA on 2020-08-26: Moving this issue to the next release, as it shouldn't hold up the 3.30.16 release.
Imported from redmine, Issue #39714 Opened by @RickMethot on 2015-10-29 Status when imported: In Progress
In 3.30, the deviations are assumed to be unit normal and are multiplied by a stddev before being used. However, they may not actually be unit normal in any instance and this caused consternation for at least one user, Grant Thompson.