Created
February 14, 2018 17:14
-
-
Save arcaravaggi/81e318c807a1cb259bc5cb6bda227fd4 to your computer and use it in GitHub Desktop.
Simple power analysis in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("pwr") | |
library(pwr) | |
# pwr.anova.test(k = , n = , f = , sig.level = , power = ) | |
# k = number of groups | |
# n = number of samples | |
# f = effect size | |
# sig.level = significance level | |
# power = power (0-1) | |
# | |
# See https://www.statmethods.net/stats/power.html for more info | |
pwr.anova.test(k = 6, f = .25, sig.level = 0.05, power = .95) | |
# Omitted n as that is calculated by the function based on other parameters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment