size.test.cor: Sample size for a test of a Pearson or partial correlation

View source: R/statpsych2.R

size.test.corR Documentation

Sample size for a test of a Pearson or partial correlation

Description

Computes the sample size required to test a Pearson or a partial correlation with desired power. Set s = 0 for a Pearson correlation.

Usage

size.test.cor(alpha, pow, cor, s, h)

Arguments

alpha

alpha level for hypothesis test

pow

desired power

cor

planning value of correlation

s

number of control variables

h

hypothesized value of correlation

Value

Returns the required sample size

Examples

size.test.cor(.05, .9, .45, 0, 0)

# Should return:
#      Sample size
# [1,]          48
 


statpsych documentation built on July 9, 2023, 6:50 p.m.