nmfs-ost / ss3-source-code

The source code for Stock Synthesis (SS3).
https://nmfs-ost.github.io/ss3-website/
Creative Commons Zero v1.0 Universal
38 stars 16 forks source link

very small change in variances of forecast values when including variance of DynamicB0 #618

Open iantaylor-NOAA opened 2 months ago

iantaylor-NOAA commented 2 months ago

Describe the bug

For purposes of testing r4ss functions, I was going to add additional variances of derived quantities to the "simple_small" model included in r4ss: https://github.com/r4ss/r4ss/tree/main/inst/extdata/simple_small. However, I noticed that there's a very small change in the variances of all forecast derived quantities when I use the modified control file control.ss.txt which includes the change image

Here's an example of the changes observed: image

I have a memory of an issue like this cropping up previously but couldn't find any associated issue. I also tested with the current in-development executable and the differences remained. Changing from 2 # Dyn Bzero: 0 to skip, 1 to include, or 2 to add recr to 0 # Dyn Bzero: 0 to skip, 1 to include, or 2 to add recr made the difference go away, so adding variance of SmryBio didn't have any impact.

To Reproduce

Run the r4ss "simple_small" model (and presumably others) with and without variance of dynamic B0 in derived quantities.

Expected behavior

Variances shouldn't be impacted by additional calculations, but maybe Dynamic B0 is unusual because of additional calculations required and we should just ignore this trivial difference and/or avoid reporting variance of Dynamic B0 unless necessary.

Screenshots

No response

Which OS are you seeing the problem on?

Windows

Which version of SS3 are you seeing the problem on?

3.30.22.1 and current development version

Additional Context

No response

Rick-Methot-NOAA commented 2 months ago

Hi Ian. I suspect this is similar to the finding that the variance of quantities decreases if the output is based on values averaged over more years, even if the value is identical in each of the years. I currently am deeply in figuring out the permutations by which time-varying biology affects the benchmark quantities, so unlikely to get to this new finding soon. Keep it on my list.

Rick