| inv_gft | R Documentation |
Reconstructs the unique positive definite correlation matrix C
with \mathrm{vecl}(\log C) = z by the GFT-FP+N
algorithm (recommended solver).
inv_gft(z, x0 = NULL, tol = 1e-13, maxit = 500, delta = 1,
exact_hess = FALSE)
z |
numeric vector of length |
x0 |
optional numeric vector of length |
tol |
convergence tolerance on
|
maxit |
maximum number of iterations. |
delta |
phase switch threshold: fixed-point steps are used while
|
exact_hess |
if |
The solution solves the strictly convex problem
x^*(z) = \arg\min_x \; \mathrm{tr}\, e^{A[x;z]} - \textstyle\sum_i x_i,
where A[x;z] is symmetric with off-diagonal elements z and
diagonal x. Phase 1 applies fixed-point steps
x \leftarrow x - \log \mathrm{diag}(e^A)
in the log domain (robust to overflow for any spectrum). Phase 2 is an
inexact Newton method: the system H s = -g is solved matrix-free
by conjugate gradients with Jacobi preconditioner
\mathrm{diag}(e^A), exact Hessian-vector products
(two matrix multiplications each), and forcing tolerance
\eta = \min(1/2, \sqrt{\|g\|})
(Eisenstat and Walker, 1996), giving superlinear convergence of order
3/2. Steps are safeguarded by Armijo backtracking on the objective,
with a fixed-point step substituted if the line search fails, and a
fixed-point finisher if progress stalls at the rounding floor.
An object of class "gft_inv": a list with components
x |
the solution: diagonal of |
C |
the reconstructed correlation matrix |
iters |
number of iterations. |
eighs |
number of eigendecompositions, the dominant |
hvs |
number of Hessian-vector products. |
err |
final value of
|
converged |
logical. |
hist |
the error after each iteration. |
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")}
Archakov, I. and Hansen, P. R. (2026). A variational approach to the generalized Fisher transformation of correlation matrices. Working paper.
Eisenstat, S. C. and Walker, H. F. (1996). Choosing the forcing terms in an inexact Newton method. SIAM Journal on Scientific Computing, 17(1), 16–32.
gft for the forward map; inv_gft_fp,
inv_gft_broyden, inv_gft_newton for the
reference solvers.
C <- 0.9^abs(outer(1:5, 1:5, "-"))
z <- gft(C)
r <- inv_gft(z)
r
max(abs(r$C - C))
# warm start from a nearby solution
z2 <- z + 0.01
r2 <- inv_gft(z2, x0 = r$x)
# an arbitrary vector in R^d is always a valid input
set.seed(1)
ra <- inv_gft(rnorm(45, sd = 2)) # n = 10
range(diag(ra$C)) # unit diagonal
min(eigen(ra$C)$values) > 0 # positive definite
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.