The function plots the power curve based on the results of the ssp_power_curve function or the ssp_bf_predetermined function.

plot_power_curve(delta, n1, animated = FALSE)

Arguments

delta

Numeric. The range of effect sizes.

n1

Numeric. The determined sample sizes for each `delta`.

animated

Logical. if TRUE the output plot is animated.

Value

The function returns a `ggplot2` or a `plotly` object.

Examples

if (FALSE) { # Determine the sample sizes for each delta curve_data <- SampleSizePlanner::ssp_power_curve( tpr = 0.8, delta = seq(0.1, 0.9, 0.01), max_n = 5000) # Plot the power curve SampleSizePlanner::plot_power_curve(delta = curve_data$delta, n1 = curve_data$n1, animated = FALSE) }