Closed marcnadon closed 1 year ago
Ok, so I think I found issue #1: the legend doesn't seem to match the actual years, for some reason. I recreated the r4ss (or is it SS diags?) figure showed below in Excel, by taking values directly from the retro runs Report files, and I get something that makes more sense: versus
So the legend on the r4ss (or SS diags) plot is off, for some reason. In the Excel graph, you can see the natural progression from 2021 to 2016 when you remove a single year (i.e. there is no size data in 2020-2021, so no impact, removing 2019 removes a chunk of length data and that's where the models start diverging, due to this).
Note that I have run this example on a model with no Super Year, as to exclude this potential issue for now.
Regarding the interaction of Retrospective x SuperYr, It doesn't seem to be the source of the discrepancy. It seems like removing 2018 and 2019 does have an impact on the population scale, probably by simply removing some critical years of data and a fair amount of size data. Without SuperYear:
With SuperYear:
I believe the issue was that the retrospective outputs were being read into R in an incorrect order. To fix this, I added
n.retro <- length(retro.dirs)
peel <- seq(0,-n.retro+1)
retro.vec <- c()
for(i in seq_along(peel)){
retro.vec[i] <- paste0("retro", peel[i])
}
retro.dirs <- paste0(file.path(getwd(), "Retrospectives"), "/", retro.vec)
mod.retro <- SSgetoutput(dirvec = retro.dirs, verbose = FALSE)```
so the retrospective peels should be read in in the correct order, regardless of the number of peels run.
I tried the updated script from Meg and I confirm that it works. Thanks Meg! Closing issue...
APRU, ETCO, and PRFL show a moderate retrospective pattern when using 5-year peels vs 3 years. What's bizarre is that patterns (see SSB graph below) is clear for years 2017 and 2018, but 2016 "snaps" back to the base model. This doesn't really make sense... What's even more bizarre is if we run 3-year peels retrospective analysis, 2018 is perfectly fine and aligns with the base model (see 2nd graph below). I think this may be related to using superyears in 2016-2021 or something, but not sure. What's also bizarre is if you open the Report file for 2018 in the 5-year peel analysis, it seems to show SSB in line with the base model (unless I'm missing something here?).