power.cor2: Approximates the power of a test for equal correlations in a...

View source: R/statpsych2.R

power.cor2R Documentation

Approximates the power of a test for equal correlations in a 2-group design for planned sample sizes

Description

Computes the approximate power of a test for equal population Pearson or partial correlations in a 2-group design for planned sample sizes. Set s = 0 for a Pearson correlation.

Usage

power.cor2(alpha, n1, n2, cor1, cor2, s)

Arguments

alpha

alpha level for hypothesis test

n1

planned sample size for group 1

n2

planned sample size for group 2

cor1

planning value of correlation for group 1

cor2

planning value of correlation for group 1

s

number of control variables

Value

Returns the approximate power of the test

Examples

power.cor2(.05, 200, 200, .4, .2, 0)

# Should return:
#     Power
# 0.5919682



statpsych documentation built on Sept. 11, 2024, 7:42 p.m.