Description Usage Arguments Value Author(s) Examples
Compute a confidence interval for a correlation coefficient r using the variance-stabilizing transformation
z = \tanh^{-1}(r) = 0.5 \log((1 + r) / (1 - r)),
known as Fisher's z-transformation. By means of this transformation, r is approximately normally distributed with variance (n-3)^{-1} independent of the true correlation ρ, enabling construction of a Wald-type confidence interval. Back-transformation yields a confidence interval for the correlation coefficient. An advantage of this approach is that the limits of the confidence interval are contained in (-1, 1).
1 2 | confIntFisherTrafo(var1, var2, pp = c(0.025, 0.975), meth =
"spearman", type = "t")
|
var1 |
Vector containing first variable. |
var2 |
Vector containing first variable. |
pp |
Vector in R^2 that contains α / 2 and 1 - α/2, where alpha is the confidence level of the confidence interval. |
meth |
Correlation coefficient to be used: |
type |
Quantile to be used: |
Yields a list with entries:
estimate |
Value of correlation coefficient. |
ci |
Computed confidence interval. |
p.value |
p-value for a test on ρ = 0 based on the transformation. |
n |
Number of observations. |
p2 |
p-value based on the |
Kaspar Rufibach
kaspar.rufibach@gmail.com
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.