power.cor1 | R Documentation |
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 |
alpha level for hypothesis test |
n |
planned sample size |
cor |
planning value of correlation |
h |
hypothesized value of correlation |
s |
number of control variables |
Returns the approximate power of the test
power.cor1(.05, 80, .3, 0, 0)
# Should return:
# Power
# [1,] 0.7751932
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.