| plot_robustness {abtest} | R Documentation |
Function for plotting Bayes factor robustness check results (i.e., prior sensitivity analysis).
plot_robustness(x, bftype = "BF10", log = FALSE, mu_range = c(0, 0.3), sigma_range = c(0.25, 1), mu_steps = 40, sigma_steps = 40, cores = 1, ...)
x |
object of class |
bftype |
character that specifies which Bayes factor is plotted. Either
|
log |
Boolean that specifies whether the log Bayes factor is plotted. |
mu_range |
numeric vector of length two that specifies the range of
|
sigma_range |
numeric vector of length two that specifies the range of
|
mu_steps |
numeric value that specifies in how many discrete steps the
interval |
sigma_steps |
numeric value that specifies in how many discrete steps
the interval |
cores |
number of cores used for the computations. |
... |
further arguments passed to |
The plot shows how the Bayes factor changes as a function of the
normal prior location parameter mu_psi and the normal prior scale
parameter sigma_psi (i.e., a prior sensitivity analysis with respect
to the normal prior on the test-relevant log odds ratio).
Returns a data.frame with the mu_psi values,
sigma_psi values, and corresponding (log) Bayes factors.
Quentin F. Gronau
## Not run: # synthetic data data <- list(y1 = 10, n1 = 28, y2 = 14, n2 = 26) # Bayesian A/B test with default settings ab <- ab_test(data = data) # plot robustness check (i.e., prior sensitivity analysis) p <- plot_robustness(ab) # returned object contains the Bayes factors for the different prior settings head(p) ## End(Not run)