Skip to content
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

add "Total without prior" line to profile plots #822

Merged
merged 8 commits into from
Jun 8, 2023
Merged

Conversation

iantaylor-NOAA
Copy link
Contributor

For profiles over parameters which have a prior, this adds a line to the profile plot showing the total likelihood without the contribution of the prior (fixes #750 and eventually can resolve pfmc-assessments/nwfscDiag#6).

For parameters with no prior or with the prior for fixed parameters excluded via starter file settings, it should have no impact.

Changes include

  • SSsummarize() now includes a par_prior_likes table in the list it returns
  • SSplotProfile() uses that information to add a line when it sees non-zero/non-NA values for the parameter being profiled
  • Users can turn off the line by using SSplotProfile(..., add_no_prior_line = FALSE) but the default is TRUE.
  • There is no change to the PinerPlot() because it is focused on the fleet-specific likelihood contributions to a single data type and that data type will never be the priors (because they are not generally fleet-specific).

Example result shown in figure below (showing that for an in-process Petrale Sole model, all sources except the prior point to higher steepness).
profile_plot_likelihood

@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Patch coverage: 47.54% and no project coverage change.

Comparison is base (ecff76f) 51.97% compared to head (0301d4b) 51.98%.

❗ Current head 0301d4b differs from pull request most recent head c00ff62. Consider uploading reports for the commit c00ff62 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #822   +/-   ##
=======================================
  Coverage   51.97%   51.98%           
=======================================
  Files         111      111           
  Lines       26170    26260   +90     
=======================================
+ Hits        13602    13651   +49     
- Misses      12568    12609   +41     
Impacted Files Coverage Δ
R/SSMethod.Cond.TA1.8.R 0.00% <0.00%> (ø)
R/SS_plots.R 69.03% <0.00%> (ø)
R/SSplotBiology.R 46.35% <0.00%> (ø)
R/SSplotDiscard.R 0.00% <0.00%> (ø)
R/helper_fxns.R 39.65% <0.00%> (-8.27%) ⬇️
R/profile.R 48.61% <ø> (ø)
R/copy_SS_inputs.R 76.00% <25.00%> (ø)
R/SS_readforecast.R 65.61% <33.33%> (-1.06%) ⬇️
R/SS_writeforecast.R 65.97% <37.50%> (-1.92%) ⬇️
R/SSplotComps.R 40.82% <44.59%> (-0.16%) ⬇️
... and 6 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@iantaylor-NOAA iantaylor-NOAA merged commit d2695dd into main Jun 8, 2023
@iantaylor-NOAA iantaylor-NOAA deleted the profile_prior branch June 8, 2023 17:09
chantelwetzel-noaa pushed a commit to pfmc-assessments/nwfscDiag that referenced this pull request Jun 14, 2023
Deprecate the use_prior_like function input for parameter profiles (issue #6) since r4ss is now dynamically showing this in profiles if a prior likelihood is used r4ss/r4ss#822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant