Learn R Programming

statpsych (version 1.7.0)

size.ci.cor2: Sample size for a 2-group Pearson correlation difference confidence interval

Description

Computes the sample size required to estimate a difference in population Pearson or partial correlations with desired confidence interval precision in a 2-group design. Set the correlation planning values to the smallest absolute values within their plausible ranges for a conservatively large sample size.

Usage

size.ci.cor2(alpha, cor1, cor2, w)

Value

Returns the required sample size

Arguments

alpha

alpha level for 1-alpha confidence

cor1

group 1 correlation planning value

cor2

group 2 correlation planning value

w

desired confidence interval width

References

Bonett2000statpsych

Examples

Run this code
size.ci.cor2(.05, .8, .5, .2)

# Should return:
# Sample size per group
#                   271
 

Run the code above in your browser using DataLab