Separate out key parts of `check_*` functions in `test_posteriors.R`
- Dominant language
- C++
- Stars
- 607
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
Assessment
This issue has not been assessed yet.