metrumresearchgroup / bbr

R interface for model and project management
https://metrumresearchgroup.github.io/bbr/
Other
23 stars 2 forks source link

test_threads() NBURN patch #538

Closed seth127 closed 2 years ago

seth127 commented 2 years ago

In test_threads() we replace either MAXEVAL or NITER with whatever is passed through .max_eval. A few things to consider, that aren't currently accounted for in the code:

pseudo-code for conditional logic

#### will need to loop over and do this for _each_ estimation method found in the control stream
ctl_lines <- read_lines(control_stream_file)
if (str_detect("MAXEVAL", ctl_lines)) {
  # replace MAXEVAL with .max_eval
} else if (str_detect("NITER", ctl_lines)) {
  # replace NITER with .max_eval
  if (str_detect("NBURN", ctl_lines) {
    # replace NBURN with .max_eval
  } else {
    # add NBURN=.max_eval
  }
} else { # if neither are found (we _think_ we need this, but not sure)
  # check estimation method and figure out whether
  # to add MAXEVAL=.max_eval or 
  # NITER=.max_eval and NBURN=.max_eval
}