Last active
June 13, 2017 15:12
-
-
Save crsh/ff4a59bd22403d83c5e94155d96f9f1b to your computer and use it in GitHub Desktop.
Function to minimize estimate error of Bayes factors in BayesFactorBF objects
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
minimizeError <- function(x, max_error, multicore = TRUE) { | |
while(any(x@bayesFactor$error > max_error)) { | |
message("Current error: ", x@bayesFactor$error) | |
x <- recompute(x, multicore = multicore) | |
} | |
x | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment