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

Separate out key parts of check_* functions in test_posteriors.R #723

Open
njtierney opened this issue Aug 28, 2024 · 0 comments
Open

Separate out key parts of check_* functions in test_posteriors.R #723

njtierney opened this issue Aug 28, 2024 · 0 comments

Comments

@njtierney
Copy link
Collaborator

For example, check_mvn_samples() calculates a scaled error variable, then checks to see if that is LTE some other value. These are two parts, one is effectively a statistical test, the other is the comparison, these should be separate components.

Similarly, check_samples() does:

  1. Compare MCMC samples of a distribution to the rnorm (using effective sample size)
  2. qqplot MCMC vs simulated values
  3. Do a kolmogorov smirnoff test of MCMC vs simulated values
  4. Compare if the KS test is below a threshold

These should be at least 3 parts:

  1. Calculate the MCMC vs simulated draws (possibly in a table?)
  2. qqplot function
  3. KS test function below a threshold

It might make it more verbose but it makes it easier to reason with when debugging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant