Learn R Programming

statpsych (version 1.7.0)

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

Description

Computes the sample size required to perform an interval test for a population Pearson or a partial correlation with desired power where the interval midpoint is equal to zero. This function can be used to plan a study where the goal is to show that the population correlation is small. Set s = 0 for a Pearson correlation. The correlation planning value must be a value within the hypothesized interval.

Usage

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

Value

Returns the required sample size

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

Examples

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

# Should return:
# Sample size
#         360
 

Run the code above in your browser using DataLab