corr.2samp: Power calculation for comparing two correlation coefficients

corr.2sampR Documentation

Power calculation for comparing two correlation coefficients

Description

Calculates power and sample size for a test that the correlation coefficients in two groups/populations are equal. Can solve for power, n1, n.ratio or alpha.

Usage

corr.2samp(
  n1 = NULL,
  n.ratio = 1,
  rho1 = NULL,
  rho2 = NULL,
  alpha = 0.05,
  power = NULL,
  sides = 2,
  v = FALSE
)

Arguments

n1

The sample size for group 1.

n.ratio

The ratio n2/n1 between the sample sizes of two groups; defaults to 1 (equal group sizes).

rho1

The correlation coefficient in group 1.

rho2

The correlation coefficient in group 2.

alpha

The significance level (type 1 error rate); defaults to 0.05.

power

The specified level of power.

sides

Either 1 or 2 (default) to specify a one- or two- sided hypothesis test.

v

Either TRUE for verbose output or FALSE (default) to output computed argument only.

Value

A list of the arguments (including the computed one).

Examples

corr.2samp(n1 = 300, rho1 = 0.3, rho2 = 0.1, sides = 1)

powertools documentation built on April 4, 2025, 5:02 a.m.