Cramer–Rao / ILR delta-method covariance of \(\hat{\boldsymbol{p}}\)
Source:R/03_05_decovart_fit.R
vcov_ilr_delta.RdMaps the expected Fisher information of unconstrained proportions through the isometric log-ratio (ILR) chart and back to the simplex via the delta method.
Let \(\boldsymbol{p}=\operatorname{softmax}(\mathbf{V}\boldsymbol{z})\)
with Jacobian
\(\mathbf{J}_{\boldsymbol{\psi}}=\mathbf{S}(\boldsymbol{p})
\mathbf{V}\)
(jacobian_isometric_logistic()). Fisher information transforms as
$$
I_{\boldsymbol{z}}
=
\mathbf{J}_{\boldsymbol{\psi}}^{\mathsf{T}}
I(\boldsymbol{p})
\mathbf{J}_{\boldsymbol{\psi}}
=
\mathbf{V}^{\mathsf{T}}
\mathbf{S}(\boldsymbol{p})
I(\boldsymbol{p})
\mathbf{S}(\boldsymbol{p})
\mathbf{V}.
$$
The first-order delta method then yields
$$
\mathrm{Var}(\hat{\boldsymbol{p}})
\approx
\mathbf{J}_{\boldsymbol{\psi}}
I_{\boldsymbol{z}}^{-1}
\mathbf{J}_{\boldsymbol{\psi}}^{\mathsf{T}}.
$$
This simplex covariance is invariant to orthogonal rotations of
\(\mathbf{V}\). The construction is undefined on the simplex
boundary (the log-ratio chart blows up); the function then returns
NA with a warning.
Wald intervals in vcov.decovart_fit(), confint.decovart_fit()
and deconvolute_ratios() all use this expected-Fisher ILR map.
The observed Hessian hessian_loglik_constrained() is for Newton
steps only; it is not the Wald covariance.
Value
Symmetric \(J\times J\) asymptotic covariance of
\(\hat{\boldsymbol{p}}\), or a matrix of NA if the bound is
undefined / singular.
Examples
# Two cell types: a single unconstrained ILR coordinate maps back to
# a rank-1 covariance on the simplex (rows sum to zero).
p <- c(ct1 = 0.6, ct2 = 0.4)
mu <- cbind(ct1 = c(0, 0), ct2 = c(3, 0))
Sigma <- array(c(diag(2), diag(2)), dim = c(2, 2, 2))
v <- vcov_ilr_delta(p, mu, Sigma)
round(v, 4)
#> ct1 ct2
#> ct1 0.0559 -0.0559
#> ct2 -0.0559 0.0559
abs(rowSums(v)) < 1e-10
#> ct1 ct2
#> TRUE TRUE