Skip to content

Instantly share code, notes, and snippets.

@tbates
Created June 3, 2014 20:23
Show Gist options
  • Save tbates/a27a81a610321ed23556 to your computer and use it in GitHub Desktop.
Save tbates/a27a81a610321ed23556 to your computer and use it in GitHub Desktop.
power calcs for PD303929 R01 grant
library(pwr)
power.t.test(n = 300, delta = NULL, sd = 1, sig.level = 0.05, power = .8, type = "paired", alternative = "one.sided")
# Paired t test power calculation
#
# n = 300
# delta = 0.1438957
# sd = 1
# sig.level = 0.05
# power = 0.8
# alternative = one.sided
#
# NOTE: n is number of *pairs*, sd is std.dev. of *differences* within pairs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment