pi.cor: Prediction limit for an estimated correlation

View source: R/statpsych2.R

pi.corR Documentation

Prediction limit for an estimated correlation

Description

Computes approximate prediction interval for the estimated Pearson correlation in a future study with a planned sample size of n. The prediction interval uses a correlation estimate from a prior study that had a sample size of n0.

Usage

pi.cor(alpha, cor, n0, n)

Arguments

alpha

alpha value for 1-alpha confidence

cor

estimated Pearson correlation from prior study

n0

sample size used to estimate correlation in prior study

n

planned sample size of future study

Value

Returns a prediction interval of an estimated correlation in a future study

Examples

pi.cor(.1, .761, 50, 100)

# Should return:
#         LL        UL
#  0.6034092 0.8573224
 


statpsych documentation built on Sept. 11, 2024, 7:42 p.m.