| alphaN_plot | R Documentation |
Draws alpha as a decreasing function of the sample size for any selection
of the calibration methods offered by alphaN(). The prior-fraction
curves ("JAB", "min", "robust", "balanced") are evaluated exactly at every
sample size; the "ES" and "moment" curves are evaluated at twelve
log-spaced sample sizes and interpolated by a spline on the log-log
scale, which keeps the plot fast (expect roughly a second of computation
per Klauer-type curve). Colors follow the colorblind-safe Okabe-Ito
palette.
alphaN_plot(
BF = 1,
max = 10000,
ylim = NULL,
methods = c("JAB", "min", "robust", "balanced"),
de = 0.5,
log = ""
)
BF |
Bayes factor you would like to match. 1 to avoid Lindley's Paradox, 3 to achieve moderate evidence and 10 to achieve strong evidence. |
max |
The maximum number of sample size. Defaults to 10,000. |
ylim |
Limits for the y-axis. The default, NULL, covers all requested curves. Set to e.g. c(0, 0.05) to zoom in on small alpha levels. |
methods |
Character vector with the methods to draw, any subset of c("JAB", "min", "robust", "balanced", "ES", "moment"). Defaults to the four prior-fraction methods, matching the behavior of earlier package versions. |
de |
The prespecified (targeted) effect size in standardized units:
Cohen's d for |
log |
Passed to |
Prints a plot.
# Plot of alpha level as a function of n for a Bayes factor of 3
alphaN_plot(BF = 3)
# Compare JAB with the effect-size and moment calibrations
alphaN_plot(BF = 3, methods = c("JAB", "ES", "moment"), log = "xy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.