Conversation
# Conflicts: # R/run_vpc.R # man/run_vpc.Rd
Contributor
|
Agree, it's better to keep the main code only in run_eval() and not repeat in separate function. Since sims are relatively fast compared to prospective runs, we can indeed keep them switched on so we can compute VPC and NPDE (coming in #14 ) so we can show even more stats by default. |
roninsightrx
approved these changes
Sep 30, 2025
| plot_fun(x, ...) | ||
| } | ||
|
|
||
| plot_vpc <- function(res, ...) { |
Contributor
There was a problem hiding this comment.
I'm ok with leaving this in, we can see how useful it is. But often creating a VPC is somewhat of an iterative process: sometimes it looks better with the observations plotted, sometimes without. Sometimes better on log-scale, sometimes on normal scale etc. So I almost never am satisfied with the default vpc() call, need to adjust with arguments.
Collaborator
Author
roninsightrx
added a commit
that referenced
this pull request
Sep 30, 2025
* add more stats * add tests + update docs * fix tests * minor build fixes * initial implementation of vpc * update docs + add tests * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * Apply suggestion from @mccarthy-m-g Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> * move to S3 + print function + few more stats * fix tests * Update R/run_vpc.R Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update R/run_vpc.R Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * update docws * integrate VPC data simulation into `run_eval()`, add VPC plot method + tests (#22) * fix progress bars * fix + workaround for issues with progressr * more fixes * minor updates progress messages * update docs --------- Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

There's currently a lot of code duplication in #12. Specifically,
run_vpc()is basically a copy ofrun_eval().Instead, this PR integrates VPC data simulation into
run_eval(), which can be controlled via a new.vpc_optionsargument. By default, we will simulate the VPC data inrun_eval(), but it can optionally be skipped. There's also an option to skip MAP bayesian estimates (this was mainly to speed up the VPC tests).I also added a VPC plot method + tests.