Constrained gradient via the chain rule
Source:R/03_03_DeCovarT_estimate_ratios_frequentist.R
gradient_loglik_constrained.RdReturns $$ \nabla_{\boldsymbol{z}}\ell = \mathbf{J}_{\boldsymbol{\psi}}^{\mathsf{T}} \nabla_{\boldsymbol{p}}\ell = \mathbf{V}^{\mathsf{T}} \mathbf{S}(\boldsymbol{p}) \nabla_{\boldsymbol{p}}\ell, $$ i.e. the first-order chain rule for \(\ell\circ\boldsymbol{\psi}\) in ILR coordinates.
Arguments
- z
Numeric vector \(\boldsymbol{z}\in\mathbb{R}^{J-1}\).
- y
Numeric vector (or one-column matrix) \(\boldsymbol{y}\in\mathbb{R}^{G}\).
- mean_signature_matrix
Numeric matrix \(\boldsymbol{\mu}\in\mathcal{M}_{G\times J}\) (plug-in means).
- Sigma
Array of cell-type covariances in \(\mathcal{M}_{G\times G\times J}\).
- V
Optional ILR basis; see
isometric_logistic().