size.interval.cor: Sample size for a finite interval test of a Pearson or...

View source: R/statpsych2.R

size.interval.corR Documentation

Sample size for a finite interval test of a Pearson or partial correlation

Description

Computes the sample size required to perform a finite interval test for a Pearson or a partial correlation with desired power. Set s = 0 for a Pearson correlation. The correlation planning value must be a value within the hypothesized finite interval.

Usage

size.interval.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

upper limit of hypothesized interval

Value

Returns the required sample size

Examples

size.interval.cor(.05, .8, .1, 0, .25)

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


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