PIFSCstockassessments / AmSam-Bottomfish-2023

Stock assessment of BMUS for American Samoa, scheduled for 2023.
Other
1 stars 0 forks source link

Standardize_CPUE2 function #35

Closed MOshima-PIFSC closed 2 years ago

MOshima-PIFSC commented 2 years ago

@marcnadon I was trying to figure out why the cpue standardize function was not working for VALO and I think I found a small issue when it was doing model selection. If the new model was not better than the previous model the loop would stop but it wasn't saving the last best model as LastModel which was used to write out the Best.P.Model.Formula. For VALO, the full model was the best model so it didn't have anything to write out as the LastModel. To fix this I added lines 107 and 154
LastModel <- aModel before it overwrites aModel with the next model formula (previous model - variable to be removed). I made this change in commit 8c96600.

marcnadon commented 2 years ago

This makes sense and should fix the issue. Thanks Meg!