metrumresearchgroup / bbr

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

Add `.join_col` and `data` arguments to `setup_bootstrap_run` #707

Open barrettk opened 1 week ago

barrettk commented 1 week ago

The need arose to add a .join_col argument because we use nm_join() under the hood to create the filtered starting dataset we resample from. The defaults were previously used, with no way to overwrite this.

The workaround was to add a NUM column to the original model and resubmit before attempting to bootstrap it, though this is obviously inconvenient and shouldn't be the behavior. Note that a support ticket has already been filed for this issue, so this PR was initially in response to that.

Since we had to touch this function anyways, I reached out to @kylebaron about adding a data argument as well. There have been previously discussions about this, though mostly offline. I followed the same approach used for nmsim models (save new data to the output directory after some checks) with some minor differences.

barrettk commented 1 week ago

@kylebaron requested your review from more of a conceptual and documentation perspective (though feel free to make any additional comments). Im planning on discussing the technical details with @seth127 upon his return for a more formal review

barrettk commented 1 week ago
Local Tests ```r > devtools::test(filter = "boot") ℹ Testing bbr ✔ | F W S OK | Context ✔ | 115 | testing bootstrap functionality and running bbi [115.8s] ══ Results ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ Duration: 115.8 s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 115 ] ```