ci.cc: Confidence interval for the population correlation...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/ci.cc.R

Description

This function is used to form a confidence interval for the population correlation coefficient. Note that this appraoch assumes that the variables the sample correlation coefficient are based are assumed to be bivariate normally distributed (e.g., Hays, 1994, Chapter 14).

Usage

1
ci.cc(r, n, conf.level = 0.95, alpha.lower = NULL, alpha.upper = NULL)

Arguments

r

observed value of the correlation coefficient (specifically the zero-order Pearson product-moment correlation coefficient)

n

sample size

conf.level

desired confidence level, where the error rate is the same on each side

alpha.lower

the Type I error rate for the lower confidence interval limit

alpha.upper

the Type I error rate for the upper confidence interval limit

Details

Note that this appraoch to confidence intervals does will not generally lead to a symmetric confidence interval. The function first transforms $r$ into emphZ\' , forms a confidence interval for the population value (i.e., $zeta$), and then transforms the confidence limits for $zeta$ into the scale of the correlation coefficient.

Value

Lower.Limit

lower limit of the confidence interval

Estimated.Correlation

observed value of the correlation coefficient

Upper.Limit

upper limit of the confidence interval

Note

This confidence interval assumes that the two variables the correlation is based are bivariate normal. See Hays (2004, Chapter 14) for details.

Author(s)

Ken Kelley (University of Notre Dame; KKelley@ND.Edu)

References

Kelley, K. (2007). Confidence intervals for standardized effect sizes: Theory, application, and implementation. Journal of Statistical Software, 20(8), 1–24.

Hays, W. L. (1994). Statistics (5th ed). Fort Worth, TX: Harcourt Brace College Publishers)

See Also

transform_Z.r, transform_r.Z

Examples

1
2
3
4
5
6
7
8
9
# Example, from Hayes. Suppose n=100 and r=.35. 
ci.cc(r=.35, n=100, conf.level=.95)

# Here is another way to enter the above example. 
ci.cc(r=.35, n=100, conf.level=NULL, alpha.lower=.025, alpha.upper=.025)

# Here are examples of one-sided confidence intervals. 
ci.cc(r=.35, n=100, conf.level=NULL, alpha.lower=0, alpha.upper=.05)
ci.cc(r=.35, n=100, conf.level=NULL, alpha.lower=.05, alpha.upper=0)

Example output

$Lower.Limit
[1] 0.1649195

$Estimated.Correlation
[1] 0.35

$Upper.Limit
[1] 0.5112702

$Lower.Limit
[1] 0.1649195

$Estimated.Correlation
[1] 0.35

$Upper.Limit
[1] 0.5112702

$Lower.Limit
[1] -1

$Estimated.Correlation
[1] 0.35

$Upper.Limit
[1] 0.4872542

$Lower.Limit
[1] 0.19587

$Estimated.Correlation
[1] 0.35

$Upper.Limit
[1] 1

MBESS documentation built on Oct. 16, 2021, 5:08 p.m.