| gft | R Documentation |
Computes the generalized Fisher transformation
\gamma = \mathrm{vecl}(\log C): the
below-diagonal elements, stacked column by column, of the matrix
logarithm of a positive definite correlation matrix C.
gft(C)
C |
a positive definite correlation matrix (square, symmetric,
numeric). The symmetric part |
The matrix logarithm is computed from the eigendecomposition of
C. For n = 2 the transformation reduces to Fisher's
classical z-transformation z = \mathrm{atanh}(\rho). The map is a bijection between the positive definite
correlation matrices and R^{n(n-1)/2}; its inverse is computed
by inv_gft.
A numeric vector of length n(n-1)/2 containing
\mathrm{vecl}(\log C).
Archakov, I. and Hansen, P. R. (2021). A new parametrization of correlation matrices. Econometrica, 89(4), 1699–1715. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3982/ECTA16910")}
inv_gft, vecl, unvecl.
# n = 2: reduces to Fisher's z-transformation
C <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
all.equal(gft(C), atanh(0.5))
C <- 0.9^abs(outer(1:5, 1:5, "-"))
z <- gft(C)
max(abs(inv_gft(z)$C - C))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.