-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn stratified mean & variance calculations in the sdmTMB folder into functions for easy re-use. #8
Comments
@gavinfay I attempted a go at this, see commit 4b26453, not sure if it is quite as efficient/clean as we would like. It also does not add the calculation type at the moment (i.e "With Wind Included, With Wind Precluded") because I am not sure how that condition will work with the simulated datasets currently but wanted to get your eyes on this for the time being. |
revisit to make more flexible with column calls to allow use regardless of columns in dataframe. |
I adjusted the stratified mean function to address the same issue you noted in the sseep-sim issue #14. It can be found with commit cf4ff1c. I also attempted to add a function to calculate the mean relative percent difference since that is being used quite a bit through the repo starting in However, when I couple these function changes and apply them to the historical data to consolidate the scripts found in Would you mind checking my Also to note, some of the estimates of abundance are a little over double when we make the change in the stratified mean function (see below). When we use the full survey area in the stratified mean calculation: When we use the total area of only the strata constituting the 95% cumulative biomass in the stratified mean calculation: |
@AngeliaMiller Wrong commit # reference I think. For both these, suggest using advice from coursework - design tests for your function(s) using small toy datasets when you know what the outputs should be. When you say
I assume you are referring to the magnitude of the mean catch rate? I see very small differences between the plots other than the y axis scale. |
For the dogfish example you mention, I assume this is due to a very low (close to zero) mean catch rate in one year (even a small change is going to be a very large relative difference when the reference value is small - small number divided by a very very small number is going to be large). |
For easier reuse across stocks and model fits, take simulation application of stratigeid mean & var calcs and create a function that does the same thing.
The text was updated successfully, but these errors were encountered: