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