pp_f2 | R Documentation |
Power plot for Cohen's f2
pp_f2(
data,
N,
u1 = 1,
u2 = 0,
sig.level = 0.05,
min_pwr = NULL,
effect = .data$f2,
labels = .data$f2
)
data |
tibble of effect size data |
N |
total sample sizes for which to compute power |
u1 |
degrees of freedom for effect generator |
u2 |
degrees of freedom for other predictors (1 + u1 + u2 + v = N) |
sig.level |
significance level (Type I error probability) |
min_pwr |
minimum desirable power to label (NULL for no label) |
effect |
variable in data representing the effect sizes |
labels |
effect labels to be used for legend |
object of class "ggplot"
The effect variable is converted to factor in the given order and labels applied respectively.
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Hillsdale,NJ: Lawrence Erlbaum.
ggplot
, pwr.f2.test
## Exercise 9.1 P. 424 from Cohen (1988)
dplyr::tibble(
f2 = 0.1 / (1 - 0.1),
y = "sales",
x = "demographics",
source = "Cohen (1988)"
) %>%
pp_f2(85:105,
u1 = 5,
labels = sprintf("%s %s", format(round(f2, 2), nsmall = 2), source)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.