plot_power: Convenience function to plot power across a range of sample...

Description Usage Arguments Value References Examples

View source: R/plot_power.R

Description

Convenience function to plot power across a range of sample sizes.

Usage

1
2
plot_power(design_result, alpha_level, min_n = 7, max_n = 100,
  plot = TRUE)

Arguments

design_result

Output from the ANOVA_design function

alpha_level

Alpha level used to determine statistical significance

min_n

Minimum sample size in power curve.

max_n

Maximum sample size in power curve.

plot

Should power plot be printed (defaults to TRUE)

Value

Returns plot with power curves for the ANOVA, and a dataframe with the summary data.

References

too be added

Examples

1
2
3
4
5
6
7
8
design_result <- ANOVA_design(design = "3b",
                             n = 20,
                             mu = c(0,0,0.3),
                             sd = 1,
                             labelnames = c("condition",
                             "cheerful", "neutral", "sad"))

plot_power(design_result, min_n = 50, max_n = 70)

Lakens/ANOVApower documentation built on Jan. 9, 2020, 5:32 p.m.