inv_gft: Inverse Generalized Fisher Transformation (GFT-FP+N)

View source: R/GFT.R

inv_gftR Documentation

Inverse Generalized Fisher Transformation (GFT-FP+N)

Description

Reconstructs the unique positive definite correlation matrix C with \mathrm{vecl}(\log C) = z by the GFT-FP+N algorithm (recommended solver).

Usage

inv_gft(z, x0 = NULL, tol = 1e-13, maxit = 500, delta = 1,
        exact_hess = FALSE)

Arguments

z

numeric vector of length n(n-1)/2: the below-diagonal elements of \log C, stacked column by column.

x0

optional numeric vector of length n: starting value for the diagonal of \log C (e.g. from a previous solution, for warm starts). Defaults to zero.

tol

convergence tolerance on \|\mathrm{diag}(e^A) - 1\|_\infty.

maxit

maximum number of iterations.

delta

phase switch threshold: fixed-point steps are used while \|\mathrm{diag}(e^A) - 1\|_\infty > \delta.

exact_hess

if TRUE, solve the Newton system with the explicit O(n^4) Hessian and a Cholesky factorization instead of matrix-free conjugate gradients. Identical algorithm otherwise; mainly for benchmarking.

Details

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.

Value

An object of class "gft_inv": a list with components

x

the solution: diagonal of \log C.

C

the reconstructed correlation matrix e^{A[x^*;z]}.

iters

number of iterations.

eighs

number of eigendecompositions, the dominant O(n^3) kernel.

hvs

number of Hessian-vector products.

err

final value of \|\mathrm{diag}(e^A) - 1\|_\infty.

converged

logical.

hist

the error after each iteration.

References

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.

See Also

gft for the forward map; inv_gft_fp, inv_gft_broyden, inv_gft_newton for the reference solvers.

Examples

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

GFT documentation built on Aug. 23, 2026, 5:10 p.m.