# Calculate the power for independent proportions given the sample sizes
power.2p.2n(p1 = 0.45, p2 = 0.6, n1 = 260, n2 = 130)
# Calculate the sample size for independent proportions (default power = 0.8)
power.2p.2n(p1 = 0.45, p2 = 0.6)
# Calculate n1 and n2 for independent proportions with ratio n2/n1
power.2p.2n(p1 = 0.44, p2 = 0.6, nratio = 2)
# Calculate n2 given n1 for independent proportions
power.2p.2n(p1 = 0.44, p2 = 0.6, n1 = 108)
Run the code above in your browser using DataLab