power.cor1: Approximates the power of a correlation test for a planned...

View source: R/statpsych2.R

power.cor1R Documentation

Approximates the power of a correlation test for a planned sample size

Description

Computes the approximate power of a Pearson or partial correlation test for a planned sample size. Set s = 0 for a Pearson correlation.

Usage

power.cor1(alpha, n, cor, h, s)

Arguments

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

Value

Returns the approximate power of the test

Examples

power.cor1(.05, 80, .3, 0, 0)

# Should return:
#          Power
# [1,] 0.7751932



statpsych documentation built on July 9, 2023, 6:50 p.m.