Skip to contents

Creates a simple line plot of empirical and/or analytical Type I error (or rejection probabilities) against effect size.

Usage

plot_type1_error_curve(
  curve_df,
  empirical = TRUE,
  exact = TRUE,
  add_reference = TRUE,
  empirical_col = "type1_empirical",
  exact_col = "type1_exact",
  legend_pos = "topright",
  ...
)

Arguments

curve_df

Data frame returned by type1_error_curve_mean() or type1_error_curve_mean_dgp().

empirical

Logical; include the Monte Carlo estimate (type1_empirical).

exact

Logical; include the analytical estimate (type1_exact).

add_reference

Logical; add a horizontal line at the nominal level alpha when available.

empirical_col, exact_col

Column names to use for empirical and exact curves. Override only if you have renamed the defaults.

legend_pos

Character or numeric legend position passed to graphics::legend(), ignored when fewer than two curves are drawn.

...

Additional arguments forwarded to the initial graphics::plot() call (e.g., main, xlab, ylab).

Value

The input data frame, invisibly.