PIFSCstockassessments / ss3diags

R package with advanced diagnostics to evaluate a Stock Synthesis model. Diagnostics include residual analyses, hindcasting and cross-validation techniques, and retrospective analyses.
http://pifscstockassessments.github.io/ss3diags/
2 stars 4 forks source link

add options to SSdeltaMVLN for var/covar approximation and bias correction #64

Closed N-DucharmeBarth-NOAA closed 1 year ago

N-DucharmeBarth-NOAA commented 2 years ago

@marcnadon Please test this with your application. If the CVs are small to modest (test with one of the more reasonable catch scenarios) then the two variance-covariance methods should yield similar results. The '2T' method should be able to handle the cases that broke previously.

@Henning-Winker I wasn't able to add you as a reviewer but if you could have a look at my changes I would appreciate it.

FYI @fecor21

efletcherPIFSC commented 1 year ago

@N-DucharmeBarth-NOAA

Got a Test run error due to the recent Code changes.

 ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-uncertainty.R:5'): (code run outside of `test_that()`) ─────────
  Error in `match.arg(arg = bias_correct_mean, choices = valid_bias_correct_mean)`: 'arg' must be NULL or a character vector
  Backtrace:
      ▆
   1. └─ss3diags::SSdeltaMVLN(simple, Fref = "MSY") at test-uncertainty.R:5:0
   2.   └─base::match.arg(arg = bias_correct_mean, choices = valid_bias_correct_mean) at ss3diags/R/SSdeltaMVLN.R:52:2

  [ FAIL 1 | WARN 9 | SKIP 0 | PASS 40 ]