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:
Compare MCMC samples of a distribution to the rnorm (using effective sample size)
qqplot MCMC vs simulated values
Do a kolmogorov smirnoff test of MCMC vs simulated values
Compare if the KS test is below a threshold
These should be at least 3 parts:
Calculate the MCMC vs simulated draws (possibly in a table?)
qqplot function
KS test function below a threshold
It might make it more verbose but it makes it easier to reason with when debugging
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:These should be at least 3 parts:
It might make it more verbose but it makes it easier to reason with when debugging