z.transform {GeneNet} | R Documentation |
Variance-Stabilizing Transformations of the Correlation Coefficient
Description
z.transform
implements Fisher's (1921) first-order and Hotelling's (1953)
second-order transformations to stabilize the distribution of the correlation coefficient.
After the transformation the data follows approximately a
normal distribution with constant variance (i.e. independent of the mean).
The Fisher transformation is simply z.transform(r) = atanh(r)
.
Hotelling's transformation requires the specification of the degree of freedom kappa
of
the underlying distribution. This depends on the sample size n used to compute the
sample correlation and whether simple ot partial correlation coefficients are considered.
If there are p variables, with p-2 variables eliminated, the degree of freedom is kappa=n-p+1
.
(cf. also dcor0
).
Usage
z.transform(r)
hotelling.transform(r, kappa)
Arguments
r |
vector of sample correlations |
kappa |
degrees of freedom of the distribution of the correlation coefficient |
Value
The vector of transformed sample correlation coefficients.
Author(s)
Korbinian Strimmer (https://strimmerlab.github.io).
References
Fisher, R.A. (1921). On the 'probable error' of a coefficient of correlation deduced from a small sample. Metron, 1, 1–32.
Hotelling, H. (1953). New light on the correlation coefficient and its transformation. J. Roy. Statist. Soc. B, 15, 193–232.
See Also
Examples
# load GeneNet library
library("GeneNet")
# small example data set
r <- c(-0.26074194, 0.47251437, 0.23957283,-0.02187209,-0.07699437,
-0.03809433,-0.06010493, 0.01334491,-0.42383367,-0.25513041)
# transformed data
z1 <- z.transform(r)
z2 <- hotelling.transform(r,7)
z1
z2