R/statpsych2.R
power.cor.Rd
Computes the approximate power of a test for a population Pearson or partial correlation test for a planned sample size. Set s = 0 for a Pearson correlation.
power.cor(alpha, n, cor, h, s)
alpha level for hypothesis test
planned sample size
planning value of correlation
null hypothesis value of correlation
number of control variables
Returns the approximate power of the test
power.cor(.05, 80, .3, 0, 0)
#> Power
#> 0.7751947
# Should return:
# Power
# 0.7751947