ci.cor: Confidence interval for a Pearson or partial correlation

View source: R/statpsych2.R

ci.corR Documentation

Confidence interval for a Pearson or partial correlation

Description

Computes a Fisher confidence interval for a population Pearson correlation or partial correlation with s control variables. Set s = 0 for a Pearson correlation. A bias adjustment is used to reduce the bias of the Fisher transformed correlation. This function uses an estimated correlation as input. Use the cor.test function for raw data input.

Usage

ci.cor(alpha, cor, s, n)

Arguments

alpha

alpha level for 1-alpha confidence

cor

estimated Pearson or partial correlation

s

number of control variables

n

sample size

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated correlation

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

\insertRef

Snedecor1980statpsych

Examples

ci.cor(.05, .536, 0, 50)

# Should return:
# Estimate        SE        LL        UL
#    0.536 0.1018149 0.2978573 0.7058914
 


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