R/statpsych2.R
ci.cor.dep.RdComputes a confidence interval for a difference in population Pearson correlations that are estimated from the same sample and have one variable in common. A bias adjustmentment is used to reduce the bias of each Fisher transformed correlation. An approximate standard error is recovered from the confidence interval.
ci.cor.dep(alpha, cor1, cor2, cor12, n)alpha level for 1-alpha confidence
estimated Pearson correlation between y and x1
estimated Pearson correlation between y and x2
estimated Pearson correlation between x1 and x2
sample size
Returns a 1-row matrix. The columns are:
Estimate - estimated correlation difference
SE - recovered standard error
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Zou GY (2007). “Toward using confidence intervals to compare correlations.” Psychological Methods, 12(4), 399--413. ISSN 1939-1463, doi:10.1037/1082-989X.12.4.399 .
ci.cor.dep(.05, .396, .179, .088, 166)
#> Estimate SE LL UL
#> [1,] 0.217 0.1026986 0.01323072 0.415802
# Should return:
# Estimate SE LL UL
# [1,] 0.217 0.1026986 0.01323072 0.415802