corr.1samp: Power calculation for test of one correlation coefficient

corr.1sampR Documentation

Power calculation for test of one correlation coefficient

Description

Calculates power and sample size for a test that the correlation coefficient in a single population is equal to (or less than or greater than) a specified value. Can solve for power, N or alpha.

Usage

corr.1samp(
  N = NULL,
  rho0 = 0,
  rhoA = NULL,
  alpha = 0.05,
  power = NULL,
  sides = 2,
  v = FALSE
)

Arguments

N

The sample size.

rho0

The correlation coefficient under the null hypothesis; defaults to 0.

rhoA

The correlation coefficient under the alternative hypothesis.

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.1samp(N = 100, rhoA = 0.2, sides = 1)
corr.1samp(N = 100, rho0 = 0.2, rhoA = 0.4, sides = 1)

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