Some of the errors are to do with resetting the random number generator! Which is good because it means that we were missing out on errors that arose due to the RNG that was set in helpers.R.
However now one error that appears when example is in test_truncated.R - previously this error didn't appear...but I think I need to debug these functions perhaps. Although they run fine interactively...
── Error (test_truncated.R:144:3): truncated inverse gamma has correct densities ──
Error in `get(paste("p", spec, sep = ""), mode = "function")`: object 'pinvgamma' of mode 'function' was not found
Backtrace:
1. compare_truncated_distribution(...) test_truncated.R:144:2
4. truncdist::qtrunc(u, spec, a = a, b = b, ...)
5. base::get(paste("p", spec, sep = ""), mode = "function")
── Error (test_truncated.R:273:3): truncated pareto has correct densities ──────
Error in `get(paste("p", spec, sep = ""), mode = "function")`: object 'ppreto' of mode 'function' was not found
Backtrace:
1. compare_truncated_distribution(...) test_truncated.R:273:2
4. truncdist::qtrunc(u, spec, a = a, b = b, ...)
5. base::get(paste("p", spec, sep = ""), mode = "function")
── Error (test_truncated.R:321:3): truncated student has correct densities ─────
Error in `get(paste("p", spec, sep = ""), mode = "function")`: object 'pstudent' of mode 'function' was not found
Backtrace:
1. compare_truncated_distribution(...) test_truncated.R:321:2
4. truncdist::qtrunc(u, spec, a = a, b = b, ...)
5. base::get(paste("p", spec, sep = ""), mode = "function")
── Error (test_truncated.R:374:3): truncated laplace has correct densities ─────
Error in `get(paste("p", spec, sep = ""), mode = "function")`: object 'plaplace' of mode 'function' was not found
Backtrace:
1. compare_truncated_distribution(...) test_truncated.R:374:2
4. truncdist::qtrunc(u, spec, a = a, b = b, ...)
5. base::get(paste("p", spec, sep = ""), mode = "function")
However I think this might be a way that