pwrss.z.corr {pwrss}R Documentation

One Correlation against a Constant (One Sample z Test)

Description

Calculates statistical power or minimum required sample size (only one can be NULL at a time) to test a (Pearson) correlation against a constant using Fisher's z transformation.

Formulas are validated using G*Power and tables in PASS documentation.

Usage

pwrss.z.corr(r = 0.50, r0 = 0, alpha = 0.05,
             alternative = c("not equal","greater","less"),
             n = NULL, power = NULL, verbose = TRUE)

Arguments

r

expected correlation

r0

constant to be compared (a correlation)

n

sample size

power

statistical power (1-\beta)

alpha

probability of type I error

alternative

direction or type of the hypothesis test: "not equal", "greater", or "less"

verbose

if FALSE no output is printed on the console

Value

parms

list of parameters used in calculation

test

type of the statistical test (z test)

ncp

non-centrality parameter

power

statistical power (1-\beta)

n

sample size

References

Bulus, M., & Polat, C. (in press). pwrss R paketi ile istatistiksel guc analizi [Statistical power analysis with pwrss R package]. Ahi Evran Universitesi Kirsehir Egitim Fakultesi Dergisi. https://osf.io/ua5fc/download/

Chow, S. C., Shao, J., Wang, H., & Lokhnygina, Y. (2018). Sample size calculations in clinical research (3rd ed.). Taylor & Francis/CRC.

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.

Examples

# expected correlation is 0.20 and it is different from 0
# it could be 0.20 as well as -0.20
pwrss.z.corr(r = 0.20, r0 = 0,
             alpha = 0.05, power = 0.80,
             alternative = "not equal")

# expected correlation is 0.20 and it is greater than 0.10
pwrss.z.corr(r = 0.20, r0 = 0.10,
             alpha = 0.05, power = 0.80,
             alternative = "greater")

[Package pwrss version 0.3.1 Index]